Closed myalsailamy closed 4 years ago
After going deep, I found that you change (TreeNgxComponent) alias to (ɵa)
at project node_modules file tree-ngx.d.ts
code:
export { TreeNgxComponent as ɵa } from './src/tree-ngx/tree-ngx.component';
Now i use it like this :
import { TreeMode, NodeItem, TreeOptions, ɵa } from 'tree-ngx';
@ViewChild('firstTreeRef', {static: true}) TreeRef: ɵa;
I would be grateful if you going to change the alias to a clear name in the next release?!, i well waiting the next version.
thanks.
Use the interface instead, Like @ViewChild('firstTreeRef') firstTreeRef: TreeNgx;
that was not work for me, because i need to access direct to treeService to use yours functions like this :
this.TreeRef.treeService.treeState
this.TreeRef.treeService.clear();
this.TreeRef.treeService.checkBoxClick(result);
Well, you are using internal methods. The correct way would be for you to issue a feature request for the functionality you are trying to achieve
I already asked in #6
AH you are right ofcourse, sorry must have slipped my attention
You do have selectById as referenced in http://emilsunesson.com/docs/tree-ngx/tree-ngx-api
many thanks
i can't import (TreeNgxComponent) any more in the new version 3 with angular 8 like version 2.
I use to use it like this :
import { TreeMode, NodeItem, TreeOptions, TreeNgxComponent } from 'tree-ngx';
to use it like this:
@ViewChild('firstTreeRef', {static: true}) TreeRef: TreeNgxComponent;
now when i updated my project the angular give me this error :
error TS2305: Module '"MyApp/node_modules/tree-ngx/tree-ngx"' has no exported member 'TreeNgxComponent'.
or could you give me way to use type TreeNgxComponent in my app .