This repository was archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Accessing $select
Tinomuchenje edited this page Aug 1, 2019
·
4 revisions
Many requests for custom features can be satisfied by accessing the uiSelectController
in your own custom directive.
To do this, create a directive of your own which require
s the uiSelect
directive, as shown below:
myModule.directive('myUiSelect', function() {
return {
require: 'uiSelect',
link: function(scope, element, attrs, $select) {
}
};
});
Using it as illustrated below:
<ui-select my-ui-select ng-model="person.selected">
<ui-select-match> ... </ui-select-match>
<ui-select-choices> ... </ui-select-choices>
</ui-select>
Refer to the source code of uiSelectController
to see what is functionality is available through this API.
If you feel your directive may be useful to others, feel free to submit it is as a Pull Request for consideration for inclusion in the library.