Angular UI-Select
"Add all" and "Remove all" feature forUsing
1) Install via bower
bower install angular-ui-select-add-remove-all --save
2) Add script
<script type="text/javascript" src="components/-somewhere-/ui-select-add-remove-all/ui-select-add-remove-all-directive.js"></script>
ui.select.addRemoveAll
3) Add dependency angular.module('myApp', [
'ui.select',
'ui.select.addRemoveAll'
]);
ui-select-add-remove-all
4) Add directive <ui-select multiple
data-ui-select-add-remove-all
data-ng-model="$ctrl.selectedCountry"
>
<ui-select-choices repeat="country as country in $ctrl.countries | filter: $select.search">
{{country}}
</ui-select-choices>
</ui-select>
5) Manually add items "- ADD ALL -" and "- REMOVE ALL -" to item list in controller.
Note: I'm not able to add this two items automatically into existing component yet. It is reason, why you have to do it manually. :-(
$ctrl.countries = [
"- ADD ALL -",
"- REMOVE ALL -",
"USA",
"Czech republic",
"Germany"
];