Home » AngularJS ng-open Directive

AngularJS ng-open Directive

by Online Tutorials Library

AngularJS ng-open Directive

The AngularJS ng-open directive sets the open attribute of a detailed list. This detailed list is visible if the expression inside the ng-open in true. A special directive is required because interpolation cannot be used inside the open attribute.

It is supported by the <details>element.

Syntax:

Parameter explanation:

expression: It specifies an expression that will set the element’s open attribute if it returns true.

Let’s take an example to demonstrate the sage of ng-open directive.

See this example:

Test it Now

You may also like