Latest web development tutorials

AngularJS ng-checked instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS examples

Select one or select all the options:

<Body ng-app = "" >
<P> My: </ p >
<Input type = "checkbox" ng -model = "all"> Check all <br> <br>

<Input type = "checkbox" ng -checked = "all"> Volvo <br>
<Input type = "checkbox" ng -checked = "all"> Ford <br>
<Input type = "checkbox" ng -checked = "all"> Mercedes
</ Body>

try it"

Definition and Usage

ng-checked instruction is used to set the check box (checkbox) or radio button (radio) of the checked attribute.

Ifng-checked property returns true, the check box (checkbox) or radio button (radio) will be selected.


grammar

<Input type = "checkbox | radio " ng-checked = "expression"> </ input>

type checkbox or radio to the <input> element supports.


Parameter Value

value description
expression If true, the element will select options.

AngularJS Reference Manual AngularJS Reference Manual