Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

AngularJS ng-open Directive


Example

Show / Hide a <details> list by clicking a checkbox:

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

<details ng-open="showDetails">
    <summary>Copyright 1999-2016.</summary>
    <p> - by Refsnes Data. All Rights Reserved.</p>
</details>
Try it Yourself »

Definition and Usage

The ng-open directive sets the open attribute of a details list.

The details list will be visible if the expression inside the ng-open attribute returns true.


Syntax

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

Supported by the <details> element.


Parameter Values

Value Description
expression An expression that will set the element's open attribute if it returns true.