ovAutoComplete
Summary
Creates a new AngularJS directive as an HTML element ov-auto-complete to be able to create a text field with suggestions.
Auto complete form element is composed of a simple input element and a list of suggestions which can be fetched asynchronously.
Attributes are:
- ng-model The model value (This must be an assignable variable evaluated as an Object) with a property "name" and a property "value"
- ov-placeholder The input placeholder text (This must be an assignable variable evaluated as a String)
- ov-get-suggestions The function to get the list of suggestions (This must be an assignable variable evaluated as a Function). This function must return an AngularJS Promise resolving with a list of suggestions with, for each suggestion, a property "name" and a property "value"
Item Index
Methods
updateModel
Syntax
updateModel
()
Summary
Updates model with actual value.
validateSuggestion
Syntax
validateSuggestion
(
-
suggestion
Summary
Validates the suggestion and clear the list of suggestions.
validateValue
Syntax
validateValue
()
Summary
Validates the input value and displays suggestions.