THE INDIA LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

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.