Ng-Open-1

 

Checkbox value is bind to open variable with ng-model directive and this value is assigns to ng-open directive which show the particular text based on their value.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app> <div> <label>Check me : <input type="checkbox" ng-model="open"></label><br /> <details id="details" ng-open="open"> <summary>{{open==true?'Show':'Hide'}} me</summary> </details> </div> </body> </html>
Output