AngularJSng-open
ディレクティブ
例
チェックボックスをクリックして、<詳細>リストを表示/非表示にします。
<input type="checkbox" ng-model="showDetails">
<details ng-open="showDetails">
<summary>Copyright 1999-2016.</summary>
<p> - by
Refsnes Data. All Rights Reserved.</p>
</details>
定義と使用法
ng-open
ディレクティブは、詳細リストのopen属性を設定します。
ng-open属性内の式がtrueを返すと、詳細リストが表示されます。
構文
<details ng-open="expression">...</details>
<details>要素でサポートされています。
パラメータ値
Value | Description |
---|---|
expression | An expression that will set the element's open attribute if it returns true. |