I am trying to set ng-selected true in ng-repet my HTML :
<select ng-model="editActivities.NewArea">
<option ng-repeat="area in areas" value="{{area.ID}}" ng-selected="editActivities.Area.ID==area.ID">{{area.Name}}</option>
</select>
the areas object:
{Name : "City1", ID : "1"}
{Name : "City2", ID : "2"}
{Name : "City3", ID : "3"}
the value of editActivities.Area.ID is 2.
when i print the values in editActivities.Area.ID and in area.ID its print :
1 2 , 2 2 , 2 3
and still the city2 is not selected.
also i Notice that the selected option is :
<option value="? undefined:undefined ?"></option>