Chỉ thị ng-open
của AngularJS
Ví 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>
Hãy tự mình thử »Định nghĩa và cách sử dụng
Lệnh ng-open
đặt thuộc tính open của 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. |