Description

Query Suggestions

Usage

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

ParamTypeDetails
completion-servicestringWhich 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)stringSearch action path information, e.g. ‘search/‘.
service-url (optional)booleanURL of the web service. Default is ’{}/twigkit/services/query-suggestion-service/.
show (optional)numberThe number of suggestions to show.
title (optional)stringAn 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

Result