@lkmylin/angular-treeview v0.0.5
angular-treeview
This project was generated with Angular CLI version 1.6.4. It uses ng-packagr to create a portable, AOT-compatible component library for Angular apps.
Installation
Run npm install @lkmylin/angular-treeview --save
Run npm install @lkmylin/angular-statemanager --save
Implementation
In your bootstrap module:
import { TreeviewModule } from "@lkmylin/angular-treeview";
import { StateManagerModule, StateManager } from "@lkmylin/angular-statemanager";
add
StateManager
to your providersadd
{provide: "window", useValue: window}
to your providersadd a TreeviewComponent:
<lkm-treeview treeid="myTree" datasource="assets/treeData.json"></lkm-treeview>
treeData.json should be an array of objects with the following properties:
TreeKey: number;
ParentKey: number;
(The TreeKey of the parent node, or zero for root nodes)Title: string;