ng-open 指令用于设置 details 列表的 open 属性。
如果 ng-open 的表达式返回 true 则 details 列表是可见的。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body ng-app="">
点击这里显示 details 列表: <input type="checkbox" ng-model="showDetails"><br>
<br>
<details ng-open="showDetails">
<summary>学的不仅是技术,更是梦想!</summary>
<p> - 菜鸟教程</p>
</details>
<p><b>注意:</b> 目前只有 Opera, Chrome, 和 Safari 浏览器支持 details 标签。</p>
</body>
</html>