angular-material-npfixed
Version:
The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M
23 lines (17 loc) • 464 B
JavaScript
angular.module('checkboxDemo2', ['ngMaterial'])
.controller('AppCtrl', function($scope) {
$scope.items = [1,2,3,4,5];
$scope.selected = [];
$scope.toggle = function (item, list) {
var idx = list.indexOf(item);
if (idx > -1) {
list.splice(idx, 1);
}
else {
list.push(item);
}
};
$scope.exists = function (item, list) {
return list.indexOf(item) > -1;
};
});