angular-select help you to manage the selection.
var app = angular.module('myApp', ['mg-select']);
Update the selection of your element based on the last selection of the user
app.directive('myDirective', function (mgSelectService) {
return function (scope, elm, attrs) {
mgSelectService.setSelection(elm[0]);
}
});
- setSelection
- updateSelection
- setSelectionRange
- deepCount
- selection
Tested with Firefox and Chrome
Improve the docs ( How did I achieve the gif example ? ) Improve the demo
Does it work with Safari and IE ?
Tests