AngularJS ng-show instructions
AngularJS examples
When you select the check box is displayed parts:
Display HTML: <input type = "checkbox " ng-model = "myVar">
<Div ng-show = "myVar ">
<H1> Welcome </ h1>
<P> Welcome to my home. </ P>
</ Div>
<Div ng-show = "myVar ">
<H1> Welcome </ h1>
<P> Welcome to my home. </ P>
</ Div>
try it"
Definition and Usage
ng-show command displays the specified HTML element when the expression is true, otherwise hidden specified HTML element.
grammar
<Element ng-show = "expression "> </ element>
All HTML elements support this instruction.
Parameter Value
value | description |
---|---|
expression | If the expression is true then displays the specified HTML element. |