Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$routeChangeStart getting called multiple times in IE8

We are supporting IE8 browser for our application. Recently we are upgraded angular version from 1.0.8 to 1.2.16

application with newer version works in all browsers however we seen the issue with ngRoute in IE8.

It broadcasts the "$routeChangeStart" multiple times.

$rootScope.$on("$routeChangeStart", (event: ng.IAngularEvent, next, current) => {

});

To identify i have added console.log inside above code it getting called twice in IE8 only.

In angular version 1.0.8 same code snippet gives one time console.log comments in browser console.

Is there any issue with ngRoute (angular version 1.2.16) for IE8 ??

like image 277
user3249448 Avatar asked Nov 01 '22 00:11

user3249448


1 Answers

Can you search your project so you don't have any $route.reload() in any file? This would make the application call the $routeChangeStart 2 times.

like image 192
Cristi Berceanu Avatar answered Nov 11 '22 06:11

Cristi Berceanu