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.
The main thing about
ng-open is write only, so here in below example we will see how we can make
ng-open work two way. To achieve this we have to add
ng-click on details tag which will update the "open" variable every time user click on details. In this example if you change the selection of checkbox then the value of details will be changed and if user change the selection of details the selection of checkbox will be automatically changed. In the last example of
ng-open, it was working as read only means once you change the details tag, it will not update the checkbox selection.