I am new to angular. I have the select declared as such (jade syntax)
select(ng-model="projectData.ProjectStatus" ng-options="c.name for c in statuses")
and statuses are initialised as
$scope.statuses = [
{name:'Active', value:1},
{name:'Not active', value: 0}
];
In resulting select, nothing is selected and it is rendered as
<select
ng-model="projectData.ProjectStatus"
ng-options="c.name for c in statuses"
class="ng-pristine ng-valid">
<option value="?" selected="selected"></option>
<option value="0">Active</option>
<option value="1">Not active</option>
</select>
How I can specify which option I need to have selected, and how to avoid rendering of first option with "?" so I simply have a select where "Not active" or "active" is already chosen?
Note that $scope.projectData.ProjectStatus IS sent to 1 but it does not seem to be in effect here...