AngularJS ng-openDirective
AngularJS Example
Show or hide the <details> list by clicking the checkbox:
<input type="checkbox" ng-model="showDetails">
<details ng-open="showDetails">
<summary>Learn not only technology, but also dreams!</summary>
<p>- Example Tutorial</p>
</details>
<details ng-open="showDetails">
<summary>Learn not only technology, but also dreams!</summary>
<p>- Example Tutorial</p>
</details>
Try it Yourself »
Definition and Usage
ng-openThe directive is used to set the open attribute of the details list.
Ifng-openthe expression returns true, then the details list is visible.
Syntax
<details ng-open="expression">...</details>
The <details> element supports this directive.
Parameter Value
| Value | Description |
|---|---|
| expression | If the expression is true, the open attribute of details will be set. |
Other Extensions
AngularJS Reference Manual