diff --git a/ng2-components/ng2-alfresco-documentlist/README.md b/ng2-components/ng2-alfresco-documentlist/README.md index 4672f3fbd7..22ce8c8cf7 100644 --- a/ng2-components/ng2-alfresco-documentlist/README.md +++ b/ng2-components/ng2-alfresco-documentlist/README.md @@ -1,10 +1,9 @@ # Document List Component for Angular 2 -## Build +## Install ```sh -npm install -npm run build +npm install --save ``` ## Basic usage @@ -20,7 +19,17 @@ npm run build ``` +Example of the component that declares document list and provides values for bindings: + ```ts +import {Component} from 'angular2/core'; +import {DOCUMENT_LIST_DIRECTIVES} from 'ng2-alfresco-documentlist/ng2-alfresco-documentlist'; + +@Component({ + selector: 'my-view', + template: '', + directives: [DOCUMENT_LIST_DIRECTIVES] +}) export class MyView { thumbnails: boolean = true; breadcrumb: boolean = false; @@ -39,6 +48,9 @@ export class MyView { } ``` +Note the use of ```DOCUMENT_LIST_DIRECTIVES``` barrel that consolidates all the document list related directives together. +It gives you access to ``````, `````` and many other directives. + ### Actions Document List supports declarative actions for Documents and Folders. @@ -86,3 +98,10 @@ export class MyView { } } ``` + +## Build from sources + +```sh +npm install +npm run build +```