Showing posts with label ng-checked. Show all posts
Showing posts with label ng-checked. Show all posts

Saturday, March 14, 2015

ng-checked directive

The ng-checked directive is used with checkbox controls to set the checkbox status to checked/un-checked. The status of the checkbox can be controlled from a variable/property in the model object, just set the model property value to the ng-checked directive and the checkbox will automatically change its state based on the value of the property.

In the following example the $scope.checkedStatus property controls the state of the checkbox control.