I have 2 checkboxes - Yes & No and I have a single model property - IsChecked to handle it which is nullable C#. When I try to bind this property and use ! operator during ngmodel it fails and throws exception. I would like to mark Yes checked when IsChecked true and No when IsChecked false. The reason I have nullable property because it is optional and user have option to select either of the checkbox or leave it as it is.I have seen some discussion related to this and usage of elvis operator but couldn't find a solution.
FYI I am using AnuglarJS 1.4
Please let me know how can this we handle in angular binding apart from using old JS style through setting using ID.
Sample code -
input type="checkbox" id="chkIsYes" ng-model="vm.IsChecked"
input type="checkbox" id="chkIsNo" ng-model="!vm.IsChecked"
Error throws when I use !vm.IsChecked