Fork me on GitHub
Attributes:
Here is the list of all attributes. Attributes should be placed on root directive (az-suggest-box).
name description
sb-list type: array
sb-list-item-alias type: string default value: 'i'
sb-model type: array default value: []
sb-model-alias type: string default value: 's'
sb-selected-indexes type: array default value: []
sb-max-selection type: integer default value: 0
sb-allow-duplicates type: boolean default value: false
sb-allow-free-text type: boolean default value: false
sb-allow-add-item type: boolean default value: false
sb-new-item-field type: string default value: 'name'
sb-search-fields type: string default value: null space separated field names,
sb-key-fields type: string default value: nullspace separated field names
sb-select-first-list-item type: boolean default value: false
sb-broadcast-event-name type: string default value: 'azSuggestBoxSelect'
sb-selected-list-item-class type: string default value: 'ng-hide'
sb-highlighted-list-item-class type: string default value: 'sb-list-item-highlight'
sb-close-list-on-select type: boolean default value: false
Directives:
Directives assign behaviour to an html element.
name description
az-suggest-box Root directive that holds all attributes and defines the scope object that is used in all other SuggestBox directives. All other SuggestBox directives should be placed inside the root directive.
sb-selection-item Selected items repeater. Copies an html element on which it is placed on as much times as there are selected items. Works like ng-repeat directive.
sb-remove-item-from-selection A button to remove item from selection. In examples you will see it as a small cross icon on each selected item. This directive should be placed inside sb-selection-item directive.
sb-trigger-area A button to show or hide dropdown list.
sb-type-ahead Handles search throw list items. Must be placed on input element.
sb-dropdown-item Dropdown items repeater. Works like angular's ng-repeat. As an array for repeating it uses sb-list
Functions:
Some useful functions.
name description
getSearchResultsCount
getListItemsCount
getSelectionCount