Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic 4 with Angular 7 #327

Open
Imaginativeone opened this issue Mar 18, 2019 · 0 comments
Open

Ionic 4 with Angular 7 #327

Imaginativeone opened this issue Mar 18, 2019 · 0 comments

Comments

@Imaginativeone
Copy link

Imaginativeone commented Mar 18, 2019

Any notes on how to get this component to work with Ionic?

The template location is in tree-internal.component.js on line 264.
TreeInternalComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'tree-internal', template: "\n <ul class=\"tree\" *ngIf=\"tree\" [ngClass]=\"{rootless: isRootHidden()}\">\n <li>\n <div class=\"value-container\"\n [ngClass]=\"{rootless: isRootHidden()}\"\n [class.selected]=\"isSelected\"\n (contextmenu)=\"showRightMenu($event)\"\n [nodeDraggable]=\"nodeElementRef\"\n [tree]=\"tree\">\n\n <div class=\"folding\" (click)=\"onSwitchFoldingType()\" [ngClass]=\"tree.foldingCssClass\"></div>\n\n <div class=\"node-checkbox\" *ngIf=\"settings.showCheckboxes\">\n <input checkbox type=\"checkbox\" [disabled]=\"isReadOnly\" [checked]=\"this.tree.checked\" (change)=\"switchNodeCheckStatus()\" #checkbox />\n </div>\n\n <div class=\"node-value\"\n *ngIf=\"!shouldShowInputForTreeValue()\"\n [class.node-selected]=\"isSelected\"\n (click)=\"onNodeSelected($event)\">\n <div *ngIf=\"tree.nodeTemplate\" class=\"node-template\" [innerHTML]=\"tree.nodeTemplate | safeHtml\"></div>\n <span *ngIf=\"!template\" class=\"node-name\" [innerHTML]=\"tree.value | safeHtml\"></span>\n <span class=\"loading-children\" *ngIf=\"tree.childrenAreBeingLoaded()\"></span>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: tree.node }\"></ng-template>\n </div>\n\n <input type=\"text\" class=\"node-value\"\n *ngIf=\"shouldShowInputForTreeValue()\"\n [nodeEditable]=\"tree.value\"\n (valueChanged)=\"applyNewValue($event)\"/>\n\n <div class=\"node-left-menu\" *ngIf=\"tree.hasLeftMenu()\" (click)=\"showLeftMenu($event)\" [innerHTML]=\"tree.leftMenuTemplate\">\n </div>\n <node-menu *ngIf=\"tree.hasLeftMenu() && isLeftMenuVisible && !hasCustomMenu()\"\n (menuItemSelected)=\"onMenuItemSelected($event)\">\n </node-menu>\n </div>\n\n <node-menu *ngIf=\"isRightMenuVisible && !hasCustomMenu()\"\n (menuItemSelected)=\"onMenuItemSelected($event)\">\n </node-menu>\n\n <node-menu *ngIf=\"hasCustomMenu() && (isRightMenuVisible || isLeftMenuVisible)\"\n [menuItems]=\"tree.menuItems\"\n (menuItemSelected)=\"onMenuItemSelected($event)\">\n </node-menu>\n\n <div *ngIf=\"tree.keepNodesInDOM()\" [ngStyle]=\"{'display': tree.isNodeExpanded() ? 'block' : 'none'}\">\n <tree-internal *ngFor=\"let child of tree.childrenAsync | async\" [tree]=\"child\" [template]=\"template\" [settings]=\"settings\"></tree-internal>\n </div>\n <ng-template [ngIf]=\"tree.isNodeExpanded() && !tree.keepNodesInDOM()\">\n <tree-internal *ngFor=\"let child of tree.childrenAsync | async\" [tree]=\"child\" [template]=\"template\" [settings]=\"settings\"></tree-internal>\n </ng-template>\n </li>\n </ul>\n " },] }, ];
That template works fine with Angular, and I'd bet that Ionic 4 would work fine too, if I could import it.

Line 3 has this code: var core_1 = require("@angular/core");

How do I (also) import @ionic/angular ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant