I want to design a dropdownlist of checkboxes and make the checkboxes multi-selectable. I have used the below code,but I am unable to make multiple selections as the templat
You can use directive like angularjs-dropdown-multiselect, which you can find very easily on internet
Here are some example:
Code Snippet:
var myApp = angular.module('exampleApp', ['angularjs-dropdown-multiselect']);
myApp.controller('appController', ['$scope',
function($scope) {
$scope.example13model = [];
$scope.example13data = [{
id: 1,
label: "David"
}, {
id: 2,
label: "Jhon"
}, {
id: 3,
label: "Lisa"
}, {
id: 4,
label: "Nicole"
}, {
id: 5,
label: "Danny"
}];
$scope.example13settings = {
smartButtonMaxItems: 3,
smartButtonTextConverter: function(itemText, originalItem) {
if (itemText === 'Jhon') {
return 'Jhonny!';
}
return itemText;
}
};
}
]);
div, h1, a {
padding: 5px;
}
Example of sytled angularjs-dropdown-multiselect
Source documentation