When I add a new item to the scope from another service, the select tag options that come from the service do not reflect the newly inserted value immediately. The new option only appears after refreshing the page. It seems like the scope is not updating the results when its values change. Here is the code I am using:
HTML code:
<select ng-model="holidaySelected"
ng-options="opt as opt.holidayName for opt in list_of_holidaytypes">
</select>
JS code:
$http({
method : 'get',
url : 'url'//url is here
}).then(function(response) {
$scope.list_of_holidaytypes = response.data;
});
After calling another service and then calling this service again, the new option is not showing up in the UI.