"/>
<">Home > Article > Web Front-end > of-model of-show
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js?1.1.10"></script> </head> <body ng-app=""> HTML: <input type="checkbox" ng-model="myVar"> {{myVar}} <div ng-show="myVar"> <h1>Welcome</h1> <p>Welcome to my home.</p> </div> </body> </html>
The ng-show directive displays the specified HTML element when the expression is true, otherwise it hides the specified HTML element.
Syntax
985a5ae08f61d6a93102cebe7fd1a337a24c0203f0ae689239f065103120aae7
All HTML elements support this directive.
The above is the detailed content of of-model of-show. For more information, please follow other related articles on the PHP Chinese website!