I am new to Angular JS.
I am trying to clear all the option values from the dropdown except the default "---select---" option.
But then an extra blank option is being created in the dropdown. I am unable to remove this blank option
Probably because $scope.screenResponse is empty. How can I make the dropdown with just the "---Select---" option?
JS Controller code:
delete $scope.screenResponse;
HTML code:
<select ng-model="messageSource" name="messageSource" ng-options="object.id as object.value for object in screenResponse ">
<option value="" >--Select--</option>
</select>