Denys Vuika 9c88fcb830 Improved component hierarchy for actions
document actions are now nested within “document-actions” container to
separate them from other action types (i.e. folder actions); and to be
able applying bulk properties for “document-actions” collection if
needed (i.e. ‘show system actions’)
2016-04-27 10:33:17 +01:00
..
2016-04-22 22:48:14 +01:00
2016-04-26 13:55:53 +01:00

Alfresco Components for Angular 2

TODO: basic overview

Build

npm install
npm run build

Basic usage

export class MyView {
    thumbnails: boolean = true;
    breadcrumb: boolean = false;
    navigation: boolean = true;
    downloads: boolean = true;

    events: any[] = [];

    onItemClick($event) {
        console.log($event.value);
        this.events.push({
            name: 'Item Clicked',
            value: $event.value
        });
    }
}
<alfresco-document-list
    #list
    [thumbnails]="thumbnails"
    [breadcrumb]="breadcrumb"
    [navigate]="navigation"
    [downloads]="downloads"
    (itemClick)="onItemClick($event)">
</alfresco-document-list>

Document actions

<alfresco-document-list ...>
    <document-actions>
        <document-action title="System action" handler="system2"></document-action>
        <document-action title="Custom action" (execute)="myCustomAction1($event)"></document-action>
    </document-actions>
</alfresco-document-list>

TODO: more details on declaring and using actions