mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-2526] Fixed interpolation marker issue in doc files (#3098)
* [ADF-2526] Test commit of a file with escape tags * [ADF-2526] Fixed interpolation marker issue in doc code samples
This commit is contained in:
committed by
Eugenio Romano
parent
f5d58178db
commit
347b2bb5e8
@@ -39,6 +39,8 @@ Searches items for supplied search terms.
|
||||
|
||||
You have to add a template that will be shown when the results are loaded.
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
```html
|
||||
<adf-search [searchTerm]="searchTerm">
|
||||
<ng-template let-result>
|
||||
@@ -51,12 +53,16 @@ You have to add a template that will be shown when the results are loaded.
|
||||
</adf-search>
|
||||
```
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
The results are provided via the [$implicit variable of angular2](https://angular.io/api/common/NgTemplateOutlet) and can be accessed via the sugar sintax 'let-yourChosenName'. As per example above the result will be something like :
|
||||
|
||||

|
||||
|
||||
But you can define even a more complex template :
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
```html
|
||||
<adf-search class="adf-search-result-autocomplete"
|
||||
[rootNodeId]="liveSearchRoot"
|
||||
@@ -97,6 +103,8 @@ But you can define even a more complex template :
|
||||
</adf-search>
|
||||
```
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
Which will look like :
|
||||
|
||||

|
||||
@@ -106,6 +114,8 @@ Which will look like :
|
||||
You can also attach your input field to the adf-search component via the trigger [searchAutocomplete]
|
||||
Yuo can do this by exporting the adf-search panel instance into a local template variable (here we called it "search"), and binding that variable to the input's searchAutocomplete property.
|
||||
|
||||
<!-- {% raw %} -->
|
||||
|
||||
```html
|
||||
<input type="text" [searchAutocomplete]="search">
|
||||
|
||||
@@ -118,6 +128,8 @@ Yuo can do this by exporting the adf-search panel instance into a local template
|
||||
</adf-search>
|
||||
```
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
In this way it is possible to fetch the results from the word typed into the input text straight into the adf-search component via the custom template variable.
|
||||
|
||||
### Custom search configuration
|
||||
|
Reference in New Issue
Block a user