I am using Angular v1.6.6. So, check the compatibility of the older version. I believe that the code below should work v1.5 onwards.
$scope.ordertypeList = ordertypeListFromApiCall;
$scope.ordertypeList.splice(0,0, {'id' : '', 'name' : 'Select Order Type...' } );
$scope.wlOrdActType = $scope.ordertypeList[0];
And in HTML,
<select class="form-control" ng-model="wlOrdActType" required ng-options="ordertype.name disable when ordertype.id == '' for ordertype in ordertypeList track by ordertype.id">
</select>
In the itemSelected function, verify that the object identifier $ scope.wlOrdActType is not empty.
source
share