mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
remove template old reference in documentation (#2421)
This commit is contained in:
parent
c4546472f5
commit
eec87c12d3
@ -102,9 +102,9 @@ It is possible to assign a custom column template like the following:
|
||||
<adf-datatable ...>
|
||||
<data-columns>
|
||||
<data-column title="Version" key="properties.cm:versionLabel">
|
||||
<template let-value="value">
|
||||
<ng-template let-value="value">
|
||||
<span>V. {{value}}</span>
|
||||
</template>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</adf-datatable>
|
||||
@ -113,21 +113,21 @@ It is possible to assign a custom column template like the following:
|
||||
Example above shows access to the underlying cell value by binding `value` property to the underlying context `value`:
|
||||
|
||||
```html
|
||||
<template let-value="value">
|
||||
<ng-template let-value="value">
|
||||
```
|
||||
|
||||
Alternatively you can get access to the entire data context using the following syntax:
|
||||
|
||||
```html
|
||||
<template let-entry="$implicit">
|
||||
<ng-template let-entry="$implicit">
|
||||
```
|
||||
|
||||
That means you are going to create local variable `entry` that is bound to the data context via Angular's special `$implicit` keyword.
|
||||
|
||||
```html
|
||||
<template let-entry="$implicit">
|
||||
<ng-template let-entry="$implicit">
|
||||
<span>V. {{entry.data.getValue(entry.row, entry.col)}}</span>
|
||||
</template>
|
||||
</ng-template>
|
||||
```
|
||||
|
||||
In the second case `entry` variable is holding a reference to the following data context:
|
||||
|
@ -1233,9 +1233,9 @@ This can be changed by means of the custom html template:
|
||||
```html
|
||||
<adf-document-list ...>
|
||||
<empty-folder-content>
|
||||
<template>
|
||||
<ng-template>
|
||||
<h1>Sorry, no content here</h1>
|
||||
</template>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
</adf-document-list>
|
||||
```
|
||||
|
@ -94,7 +94,7 @@ You can replace the entire content in the footer of the login component with you
|
||||
|
||||
```html
|
||||
<adf-login ...>
|
||||
<login-footer><template>My custom HTML for the footer</template></login-footer>
|
||||
<login-footer><ng-template>My custom HTML for the footer</ng-template></login-footer>
|
||||
</adf-login>`
|
||||
```
|
||||
|
||||
@ -106,7 +106,7 @@ You can replace the entire content in the header of the login component with you
|
||||
|
||||
```html
|
||||
<adf-login ...>
|
||||
<login-header><template>My custom HTML for the header</template></login-header>
|
||||
<login-header><ng-template>My custom HTML for the header</ng-template></login-header>
|
||||
</adf-login>`
|
||||
```
|
||||
|
||||
|
@ -13,10 +13,10 @@ Here's an example of basic image-related metadata fetched from the server:
|
||||
<alfresco-document-list ...>
|
||||
<data-columns>
|
||||
<data-column key="properties" [sortable]="false">
|
||||
<template let-value="value">
|
||||
<ng-template let-value="value">
|
||||
<adf-metadata-icons [metadata]="value">
|
||||
</adf-metadata-icons>
|
||||
</template>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
...
|
||||
</data-columns>
|
||||
@ -59,9 +59,9 @@ Next we propagate the `value` reference to the `<adf-metadata-icons>` component
|
||||
|
||||
```html
|
||||
<data-column key="properties" [sortable]="false">
|
||||
<template let-value="value">
|
||||
<ng-template let-value="value">
|
||||
<adf-metadata-icons [metadata]="value"></adf-metadata-icons>
|
||||
</template>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
```
|
||||
|
||||
|
@ -69,10 +69,10 @@ This can be changed by adding the following custom html template:
|
||||
```html
|
||||
<adf-task-details [taskId]="taskId">
|
||||
<no-task-details-template>
|
||||
<template>
|
||||
<ng-template>
|
||||
<h1>Sorry, no tasks here</h1>
|
||||
<img src="example.jpg">
|
||||
</template>
|
||||
</ng-template>
|
||||
</no-task-details-template>
|
||||
</adf-task-details>
|
||||
```
|
||||
|
@ -122,12 +122,12 @@ Below you can find an example with the use of `extension-viewer` if you can hand
|
||||
[overlayMode]="true">
|
||||
|
||||
<extension-viewer [supportedExtensions]="['obj','3ds']" #extension>
|
||||
<template let-urlFileContent="urlFileContent" let-extension="extension">
|
||||
<ng-template let-urlFileContent="urlFileContent" let-extension="extension">
|
||||
<threed-viewer
|
||||
[urlFile]="urlFileContent"
|
||||
[extension]="extension">
|
||||
</threed-viewer>
|
||||
</template>
|
||||
</ng-template>
|
||||
</extension-viewer>
|
||||
|
||||
</adf-viewer>
|
||||
@ -144,19 +144,19 @@ It is possible to define multiple `extension-viewer` templates:
|
||||
[overlayMode]="true">
|
||||
|
||||
<extension-viewer [supportedExtensions]="['xls','xlsx']" #extension>
|
||||
<template let-urlFileContent="urlFileContent" >
|
||||
<ng-template let-urlFileContent="urlFileContent" >
|
||||
<my-custom-xls-component
|
||||
urlFileContent="urlFileContent">
|
||||
</my-custom-xls-component>
|
||||
</template>
|
||||
</ng-template>
|
||||
</extension-viewer>
|
||||
|
||||
<extension-viewer [supportedExtensions]="['txt']" #extension>
|
||||
<template let-urlFileContent="urlFileContent" >
|
||||
<ng-template let-urlFileContent="urlFileContent" >
|
||||
<my-custom-txt-component
|
||||
urlFileContent="urlFileContent">
|
||||
</my-custom-txt-component>
|
||||
</template>
|
||||
</ng-template>
|
||||
</extension-viewer>
|
||||
</adf-viewer>
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user