autoComplete (directive in module ngTagsInput)
Provides autocomplete support for the tagsInput directive.
Name | Type | Description | Defaults to |
---|---|---|---|
source (required) | expression | Expression to evaluate upon changing the input content. The input value is available as $query. The result of the expression must be a promise that eventually resolves to an array of strings. | – |
template | string | URL or id of a custom template for rendering each element of the autocomplete list. | – |
displayProperty | string | Property to be rendered as the autocomplete label. | tagsInput.displayText |
debounceDelay | number | Amount of time, in milliseconds, to wait before evaluating the expression in the source option after the last keystroke. | 100 |
minLength | number | Minimum number of characters that must be entered before evaluating the expression in the source option. | 3 |
highlightMatchedText | boolean | Flag indicating that the matched text will be highlighted in the suggestions list. | true |
maxResultsToShow | number | Maximum number of results to be displayed at a time. | 10 |
loadOnDownArrow | boolean | Flag indicating that the source option will be evaluated when the down arrow key is pressed and the suggestion list is closed. The current input value is available as $query. | false |
loadOnEmpty | boolean | Flag indicating that the source option will be evaluated when the input content becomes empty. The $query variable will be passed to the expression as an empty string. | false |
loadOnFocus | boolean | Flag indicating that the source option will be evaluated when the input element gains focus. The current input value is available as $query. | false |
selectFirstMatch | boolean | Flag indicating that the first match will be automatically selected once the suggestion list is shown. | true |
matchClass | expression | Expression to evaluate for each match in order to get the CSS classes to be used. The expression is provided with the current match as $match, its index as $index and its state as $selected. The result of the evaluation must be one of the values supported by the ngClass directive (either a string, an array or an object). See https://docs.angularjs.org/api/ng/directive/ngClass for more information. | – |