I've recently updated my treeview component to 1.3.2 and I'm running into the follow error:
Error:(5, 10) TS2305: Module '"node_modules/angular2-tree-component/dist/angular2-tree-component"' has no exported member 'TreeComponent'.
import { TreeComponent, TreeNode } from 'angular2-tree-component';`
I tried changing this to TreeModule but wasn't sure that was correct, should the view child be a treeModule? That doesn't seem right?
@ViewChild('tree')
tree: TreeModule;
It also complains about treeModel not being a property of tree, which is a treeModal, which makes sense.
let node: TreeNode = this.tree.treeModel.getNodeById(this.page.parentId);
How should I reference the tree now?
+1, workaround is to open angular2-tree-component.d.ts in node_modules/angular2-tree-component'and add the following line:
import { TreeComponent } from './components/tree.component';
and add TreeComponent to the export like this:
export { TreeModel, TreeNode, ITreeOptions, TREE_ACTIONS, KEYS, IActionMapping, IActionHandler, TreeComponent };
@ciesielskico Thank you, that gets around it for now!
PR #62 should fix this issue along with adding support for AoT compiled apps.
Yup, just waiting for @isaacplmann to comment on PR #62, once it's closed we can close this issue as well
I am still seeing this error, even after upgrading to v1.3.4 (ce2986dcb4ff7b83b75a8455d4ec7315c127c9f4)
TypeScript Error
no exported member 'TreeComponent'
├─┬ [email protected]
│ └── [email protected]
Should this be the case, or must #62 still be merged first?
It should be solved in 1.3.4 - checking....
Confirmed fixed in v1.3.5. Thank you!!
Awesome
Most helpful comment
PR #62 should fix this issue along with adding support for AoT compiled apps.