mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
@@ -1,10 +1,9 @@
|
|||||||
# Document List Component for Angular 2
|
# Document List Component for Angular 2
|
||||||
|
|
||||||
## Build
|
## Install
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install
|
npm install --save <TBD>
|
||||||
npm run build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Basic usage
|
## Basic usage
|
||||||
@@ -20,7 +19,17 @@ npm run build
|
|||||||
</alfresco-document-list>
|
</alfresco-document-list>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example of the component that declares document list and provides values for bindings:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
import {Component} from 'angular2/core';
|
||||||
|
import {DOCUMENT_LIST_DIRECTIVES} from 'ng2-alfresco-documentlist/ng2-alfresco-documentlist';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'my-view',
|
||||||
|
template: '<YOUR TEMPLATE>',
|
||||||
|
directives: [DOCUMENT_LIST_DIRECTIVES]
|
||||||
|
})
|
||||||
export class MyView {
|
export class MyView {
|
||||||
thumbnails: boolean = true;
|
thumbnails: boolean = true;
|
||||||
breadcrumb: boolean = false;
|
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 ```<document-actions>```, ```<folder-actions>``` and many other directives.
|
||||||
|
|
||||||
### Actions
|
### Actions
|
||||||
|
|
||||||
Document List supports declarative actions for Documents and Folders.
|
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
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user