You have seen the example in Gmail and many other web applications where they allow users to select all checkbox items by simply clicking on “Select All” checkbox. I have also created a tutorial in jQuery which you can find here.
Today let’s create the same using AngularJS.
Our HTML goes like this:
We need to define the root element view of the application by adding ng-app=”selectApp” attribute to DIV element, then we specify behavior to main toggle checkbox by adding ng-click=”toggleSelect()” directive, which will toggle the checkboxes we iterate using ng-repeat directive.
Once we declare the controller, we can add checkbox attributes to $scope object. $scope.checkboxes =  you can specify as many checkboxes you want. Next we add behavior to toggleSelect function, which is attached to ng-click directive in our HTML.