Description
Query SuggestionsUsage
as element:<query:suggestions
completion-service="{string}"
[action="{string}"]
[service-url="{boolean}"]
[show="{number}"]
[title="{string}"]>
</query:suggestions>
Directive info
- This directive creates new scope.
Parameters
| Param | Type | Details |
|---|---|---|
| completion-service | string | Which service or services (as a comma separated list) to use for as-you-type suggestions, as defined in the configuration files for services. |
| action (optional) | string | Search action path information, e.g. ‘search/‘. |
| service-url (optional) | boolean | URL of the web service. Default is ’{}/twigkit/services/query-suggestion-service/. |
| show (optional) | number | The number of suggestions to show. |
| title (optional) | string | An optional title to display above the list |
Example
Source
<search:box>
<query:suggestions completion-service="services.suggestions.static"></query:suggestions>
</search:box>
angular.module('lightning')
.controller('ExampleController', ['$scope','$timeout','ResponseService', function($scope,$timeout,ResponseService) {
}]);
Result
