How To Check/uncheck All Check Boxes Using Angularjs?
I'm new in AngularJS and trying to achieve check/uncheck all check boxes by clicking 'toggle' button, which is styled by bootstrap. Markup:
<scriptsrc="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script><htmlng-app="app"><bodyng-controller="MainCtrl as vm"><divclass="container"><h3>{{vm.message}}</h3><form><buttonid="toggle"class="btn btn-link btn-mini"ng-click="vm.UpdateCheckboxes()"><spanng-show="vm.checkoxesState"> Check all </span><spanng-hide="vm.checkoxesState"> Uncheck All </span></button><divclass="row-fluid"ng-repeat="at in vm.actionsQuery.actionTypes"><divclass="checkbox"><label><inputtype="checkbox"ng-model="at.checked">{{at.Description}}</label></div></div></form></div></body></html>
Post a Comment for "How To Check/uncheck All Check Boxes Using Angularjs?"