Skip to content

Commit dacae88

Browse files
author
Georgii Rychko
authored
Merge pull request #134 from akkumar/doc_cli
Add specific snippet for easy integration of ng2-tree with angular cli
2 parents 0a39e42 + 5e95580 commit dacae88

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ class MyComponent {
104104
```
105105

106106
3. Apart from that, in order to have usable tree in the browser, you need to add **ng2-tree styles** which you can find in your `node_modules/ng2-tree/styles.css`
107+
108+
In Angular 2/4 cli projects, modify **.angular-cli.json** as below:
109+
110+
```typescript
111+
112+
"styles": [
113+
"styles.css",
114+
"../node_modules/ng2-tree/styles.css"
115+
],
116+
```
107117
4. And finally, I suppose, you'd want to listen to events generated by ng2-tree (for a full list of supported events look at the [API](#wrench-api)). No problem, this is also easy to do - for example let's add a listener for `node was selected` kind of events:
108118

109119
```typescript

0 commit comments

Comments
 (0)