AngularJS ng-open 指令

[

AngularJS ng-open 指令
AngularJS 参考手册

AngularJS 实例

通过点击 checkbox 显示或隐藏 <details> 列表:

<input type="checkbox" ng-model="showDetails"><details ng-open="showDetails">    

   <summary>学的不仅是技术,更是梦想!</summary>    <p> - Break易站</p></details>

定义和用法

ng-open 指令用于设置 details 列表的 open 属性。
如果 ng-open 的表达式返回 true 则 details 列表是可见的。

语法


<details ng-open="expression">...</details>

<details> 元素支持该指令。

参数值

描述
expression 如果表达式为 true 则会设置 details 的 open 属性。
]
转载请保留页面地址:https://www.breakyizhan.com/javascript/19217.html
原文地址:https://www.cnblogs.com/breakyizhan/p/13272605.html