Socket
Book a DemoInstallSign in
Socket

ng2-treelist

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-treelist

Create a tree list component with Angular2

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

ng2-treelist

(WIP) Getting comfy publishing Angular2 Components.

If you are interested in an Angular2 tree component, please use n2-tree

install

npm install --save ng2-treelist

use

After installing ng2-treelist. Import the Tree and Tree Model into your component.

import {Tree, TreeModel} from 'ng2-tree/components';


@Component({
    selector: 'app',
    template: `
               <tree [tree]="tree"></tree>
               `
})

export class App {
	public tree: TreeModel[] = [
	    new TreeModel("Menu Item 1", [
	    	new TreeModel("SubMenu Item 1", [
		        new TreeModel("SubSubMenu Item 1", []),
		        new TreeModel("SubSubMenu Item 2", [])
		    ]),
		    new TreeModel("SubMenu Item 2", [])
	    ]),
	    new TreeModel("Menu Item 2", []),
	    new TreeModel("Menu Item 3", [
	    	new TreeModel("SubTreeModel 3", [])
	    ])
	];
}

TreeModel is will include your own tree nodes.

License

MIT © Malek Hakim

Keywords

Angular

FAQs

Package last updated on 24 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts