CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.09k stars 488 forks source link

Angular-Tree-Component DOM not rendered in Angular9 #849

Open atulgupt opened 4 years ago

atulgupt commented 4 years ago

HTML: <tree-root [nodes]="nodeItems" [focused]="true"> Import in typscript : import { IActionMapping, TREE_ACTIONS, TreeComponent, TreeNode, ITreeOptions } from '@circlon/angular-tree-component';

nodeItems = [ { id: 1, name: 'root1', children: [ { id: 2, name: 'child1' }, { id: 3, name: 'child2' } ] }, { id: 4, name: 'root2', children: [ { id: 5, name: 'child2.1' }, { id: 6, name: 'child2.2', children: [ { id: 7, name: 'subsub' } ] } ] }, { id: 8, name: 'root3', children: [ { id: 9, name: 'child1' } ] } ];

optionsNew: ITreeOptions = {
    useCheckbox: true,
    getChildren: this.getChildren.bind(this)
};

"@circlon/angular-tree-component": "^10.0.0", Angular version in attachment Screenshot (36)

tobiasengelhardt commented 4 years ago

Hi @atulgupt, for Angular 9 you can use version 9 of the tree. We base our mayor version on the Angular Version it's build for. I'm having trouble reproducing the issue. Is there an error message in the console? You have the optionsNew: ITreeOptions object, but it seems to not be used in the template. Do you have minimal repo you can make public?

atulgupt commented 4 years ago

hi @tobiasengelhardt Thanks for quick response! I fixed this issue. After deep debuging the all import JS and CSS in angular.json files in my code, I found the issue with reflect.js file once I removed the same the issue were fixed in run. Another Issue I found in ng build on server ERROR in getInternalNameOfClass() called on a non-ES5 class: expected TreeMobxAutorunDirective to have an inner class declaration�[0m�[91m �[0mThe command '/bin/sh -c node --max_old_space_size=8192 $(npm bin)/ng build --configuration=dev --output-path=./dist/out' returned a non-zero code:

Please suggest how I fixed it. I enable the ivy complier in angular9