Introduction and Features
Using this Module you can utilize an Angular Tree Component in Angular 2+.
Feel free to contribute, raise feature requests and make it better. Here is the main Features:
1. toggle: expand or collapse
2. active: active or deactive
3. focus: focus or blur
4. keys operations:down | up | left | right | space | enter
5. node operation api: add node | remove node 6. contextmenu demo added by catching up with the ContextMenu event
Common Tree Component for Angular2 Plus
npm install ng2tree-common --save
- (1) Include TreeModule in Main Module where you want to use the tree component.(eg: app.module.ts):
- (2) Create Editor options in component.(eg: app.component.ts)
- (3) Include editor in html with options and ngModel bindings.(eg: app.component.html)
Output event (onToggle、onActivate、onDeactivate、onActiveChanged, ...) expose the tree instance that can be used for performing custom operations on it.
The ng2tree-common exposes api for user to customize his/her config.
- (1) Create tree options in component.(eg: app.component.ts)
- (2) Using your custom options as the ng2tree-common's input.(eg: app.component.html)
MIT © John Wang