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.
In the following example the $scope.checkedStatus property controls the state of the checkbox control.