Skip to content Skip to sidebar Skip to footer

How Do I Bind A Checkbox To A Select Disabled Property Using Angular Data Binding?

I have a select control with a couple of options and a check box. The check box needs to control if the select is disabled or not. Initially my code gets it correct but when the va

Solution 1:

You do not need to type "scope" when you are in the markup, just type what is attached to the scope. Also you should be using ng-disabled.

So remove the word 'scope' here.

<selectng-disabled="!IsEnabled"><optionvalue="1">1</option><optionvalue="2">2</option><optionvalue="3">3</option><optionvalue="4">4</option></select>

See fiidle: http://jsfiddle.net/eZhZL/7/

Hope this helps.

Post a Comment for "How Do I Bind A Checkbox To A Select Disabled Property Using Angular Data Binding?"