I have a 10(or n)checkbox in my ng-view. Now I would like to ask here that What is the most efficient or simple way to check if checkbox is checked and if checked get the v
Have a look at this fiddle,i have used the object whose key is the album name
controller:
function ctrl($scope){
$scope.albums = [{name:'a1'},{name:'a2'},{name:'a3'}];
$scope.folder = {};
$scope.albumNameArray = [];
$scope.getAllSelected = function(){
angular.forEach($scope.folder,function(key,value){
if(key)
$scope.albumNameArray.push(value)
});
}}