AngularJS ng-show 指令

AngularJS 教程 · 2019-04-02 06:57:06

AngularJS 实例

复选框选中时显示部分内容:

显示 HTML: <input type="checkbox" ng-model="myVar">
<div ng-show="myVar">
<h1>Welcome</h1>
<p>Welcome to my home.</p>
</div>

定义和用法

ng-show 指令在表达式为 true 时显示指定的 HTML 元素,否则隐藏指定的 HTML 元素。

语法

<element ng-show="expression"></element>

所有的 HTML 元素支持该指令。

参数值

描述
expression 如果表达式为 true 则显示指定的 HTML 元素。

点击查看所有 AngularJS 教程 文章: https://www.codercto.com/courses/l/36.html

查看所有标签

Blog Design Solutions

Blog Design Solutions

Richard Rutter、Andy Budd、Simon Collison、Chris J Davis、Michael Heilemann、Phil Sherry、David Powers、John Oxton / friendsofED / 2006-2-16 / USD 39.99

Blogging has moved rapidly from being a craze to become a core feature of the Internetfrom individuals sharing their thoughts with the world via online diaries, through fans talking about their favori......一起来看看 《Blog Design Solutions》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具