I'm having an issue with setting an input button to disabled when a user selects a specific value from a select box:
Here is my select menu:
<select id="jobstatus" name="jobstatus" ng-model="associate.JobStatus" class="form-control">
<option value="0">Current</option>
<option value="1">Former</option>
<option value="2">Never worked there</option>
</select>
And here is the input button in question:
<input type="submit" class="btn btn-info pull-right
btn-lg btn-block" ng-disabled="{{associate.JobStatus === '2'}}" />
When I check the source code, I can see that when I select option 2
, the input button switches from ng-disabled="false"
to ng-disabled="true"
. However, the disabled attribute is not being applied to the button as expected.
What could be causing this issue?