Setting selected item in select

Viewed 71

I tried everything here but nothing works. I would like to set Yes as selected at the start. For now it has one empty option and then Yes and No.

<div class="form-group" ng-class="{ 'has-error' : someForm.aktivan.$invalid && !someForm.active.$pristine }">
    <label class="control-label col-sm-2">Jep:</label>
    <div class="col-sm-10">
        <select class="form-control" name="ak" id="ak" ng-model="operater.ak" ng-options="o.value as o.option for o in items" required></select>
        <p ng-show="someForm.aktivan.$error.required && !someForm.aktivan.$pristine" class="help-block">Change the values</p>

    </div>
</div>

Its gets it from :

$scope.items = [
    {
        value: 1,
        option: 'Yes'
    },
    {
        value: 0,
        option: 'No'
    }
];
3 Answers
Related