<"/> <">

Home  >  Article  >  Web Front-end  >  of-model of-show

of-model of-show

巴扎黑
巴扎黑Original
2017-06-23 14:45:372018browse
<!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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn