Can someone explain to me the following weird binding / checking behavior when binding a select list to boolean values?
Choosing Yes (true) works as expected. The choice of No (false) is obviously not fulfilled:
JSFIDDLE: http://jsfiddle.net/mhu23/ATRQG/14/
$scope.trueFalseOptions = [{ value: true, label: 'Yes' }, { value: false, label: 'No' }]; <select name="parameter" required ng-model="myModel" ng-options="x.value as x.label for x in trueFalseOptions"></select>
Am I doing something wrong? I would like to be able to select "Yes" or "No" from the drop-down list. The values ββof the option elements must be true or false (logical, not string).
Thank you for your help!
source share