How can I put multiple values for ng-disabled in angular js?
My problem is explained with this following JS fiddle:
http://jsfiddle.net/FJf4v/10/
<div ng-app>
<div ng-controller=myCnt>
<h3>A ->> <input type=checkbox ng-model=check> </input></h3>
<h3>B ->> <input type=checkbox ng-model=check> </input></h3>
<br/>
<input type=checkbox ng-disabled=check>Chkbox1 to be disabled</input>
<input type=checkbox ng-disabled=check>Chkbox2 to be disabled</input>
<hr/>
</div>
</div>
Javascript:
function myCnt($scope) {
//
}
In this fiddle, there are total 4 check boxes labeled as A, B, Chkbox1 and Chkbox2.
What I am looking for is to disable both chkbox1 and chkbox2 after checking one of A and B checkboxes. However, its done halfway. If you click on either A or B, both these buttons are getting checked and below chkboxes are getting disabled. But, I dont want to get checked both A and B checkboxes if I just click on any one of them.
I hope, you will get my question.
Thank you !!