Answer the question
In order to leave comments, you need to log in
Why does ng-options output an empty option when passed an array of booleans?
Why does ng-options output an empty option when passed an array of booleans?
There is such layout
<select id="autoAppl" class="form-control auto_applications" ng-model="serviceForm.auto" ng-options="opt.value as opt.title for opt in yesNoOptions">
</select>
$scope.yesNoOptions = [
{value: 'N', title: 'Нет'},
{value: 'Y', title: 'Да'}
];
$scope.yesNoOptions = [
{value: false, title: 'Нет'},
{value: true, title: 'Да'}
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question