Home > Web Front-end > H5 Tutorial > body text

of-model of-show

巴扎黑
Release: 2017-06-23 14:45:37
Original
2017 people have browsed it
<!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>
Copy after login

The ng-show directive displays the specified HTML element when the expression is true, otherwise it hides the specified HTML element.

Syntax

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!