Select Boxes with Angular
selected - {{selected}}
selected - {{selected}}
$('#mySingleSelect').select2({
placeholder: 'Select a Name...',
formatNoMatches: function() { return 'No Matches Found for your Search'; }
});
var angApp = angular.module('myApp',[]);
angApp.controller('appCtrl', ['$scope', function($scope){
$scope.collection = [
{name:'Scott'},
{name:'Steve'},
{name:'Nick'},
{name:'Asha'},
{name:'Vishak'},
{name:'Joel'},
{name:'Ralph'},
{name:'Marq'},
{name:'Michele'},
{name:'Kiavash'}
];
}]);
selected people - {{selectedPeople}}
selected people - {{selectedPeople}}
$('#myMultiSelect').select2({
placeholder: 'Select a Name...',
formatNoMatches: function() { return 'No Matches Found for your Search'; }
});
angular.module('myApp').controller('taggingCtrl', function($scope){
$('#select').select2({
tags: $scope.collection.map(function(personObject){ return personObject.name; })
});
});