I am displaying data from a database in a table. One of the table columns stores true/false. I am displaying this column as a drop down, but the value is not defaulting to the database value. The default is blank.
JS
$scope.options = [{ label: 'false', val: false }, { label: 'true', val: true }];
$scope.usersList = users
HTML
<tr ng-repeat = "user in usersList">
<td>
<select ng-model="user.admin"
ng-options="opt as opt.label for opt in options">
<option value="{{user.admin}}">{{user.admin}}</option>
</select>
</td>
</tr>
Page Source
<td>
<select ng-model="user.admin" ng-options="opt as opt.label for opt in options" class="ng-pristine ng-valid ng-touched"><option value="?" selected="selected"></option><option label="false" value="object:15">false</option><option label="true" value="object:16">true</option></select>
</td>