ng-openChỉ thị AngularJS


Thí dụ

Hiển thị / Ẩn danh sách <details> bằng cách nhấp vào hộp kiểm:

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

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

Định nghĩa và Cách sử dụng

Lệnh ng-openthiết lập thuộc tính mở của một danh sách chi tiết.

Danh sách chi tiết sẽ hiển thị nếu biểu thức bên trong thuộc tính ng-open trả về true.


Cú pháp

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

Được hỗ trợ bởi phần tử <details>.


Giá trị tham số

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