Javatpoint Logo
Javatpoint Logo

AngularJS ng-checked Directive

The AngularJS ng-checked directive is used to set a checked attribute on the element and add a checkbox or a radiobutton. You can set its value true or false. The checkbox, or radiobutton, will be checked if the expression inside the ng-checked attribute returns true.

Note: This ng-change directive is supported by the HTML tags like <input> elements of type checkbox or radio.

Syntax:

Parameter explanation:

expression: It specifies an expression that will set the element's checked attribute if it returns true.

Let's take an example to demonstrate ng-checked directive.

See this example:

Test it Now




Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA