[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:
Andy Stark
2018-03-20 14:03:12 +00:00
committed by Eugenio Romano
parent f5d58178db
commit 347b2bb5e8
19 changed files with 108 additions and 0 deletions

View File

@@ -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 :
![adf-search-control](../docassets/images/search-component-simple-template.png)
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 :
![adf-search-control](../docassets/images/search-component-complex-template.png)
@@ -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