From 87b479e7209d72a1765297ab0c2d92bf6f80b70a Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 19 Apr 2017 15:41:47 +0100 Subject: [PATCH] datatable improvements (#1822) - move ngSwitch outside of the ngFor directive (to avoid issues) - improved template maintainance (without ngFor template hack) - readme updates to reflect new features --- .../app/components/files/files.component.html | 11 +++- .../ng2-alfresco-datatable/README.md | 62 ++++++++++++++++++- .../datatable/datatable.component.html | 43 +++++++------ 3 files changed, 94 insertions(+), 22 deletions(-) diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index 5df948d19f..1a30ea81f9 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -27,12 +27,21 @@ title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}" key="name" class="full-width ellipsis-cell"> - + + + + + + ``` +#### Column Templates + +It is possible assigning a custom column template like the following: + +```html + + + + + + + +``` + +Example above shows access to the underlying cell value by binding `value` property to the underlying context `value`: + +```html +