I am new to Angular.
I am trying to redirect from the current page to another page based on the response from API.
The redirection is happening but the code is not working correctly in IE browser but is working fine in Chrome.
Could someone please help why this error occurs?
Error in IE console:
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
SCRIPT5022: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations:
JS file:
app.config(function($routeProvider){ $routeProvider
.when('/findCustomer', {
templateUrl: 'CustomerList.html',
controller: 'customerListController',
})
.when('/modifyCustomer', {
templateUrl: 'ModifyCustomer.html',
controller: 'modifyController',
})
Customer list Controller:
service.getCustomerList().then(function(data) {
if (data.length == 1) {
$window.location.href= "#/modifyCustomer";
}