$routeChangeStart getting called multiple times in IE8 - angularjs

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 ??

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.

Related

Angular Material broken on chrome version 53.~

I've an web application with AngularJS and Angular Material.
It works fine on Firefox. On chrome, just versions lower then 53.
Firefox
Chrome 52.0.2743.116
Chrome 53.0.2785.116
The error begins when page is scrolled. The fields seems to be fixed.
I searched for any class with any problem, but everything seems to be ok.
I updated material design and angular to the last stable version.

AngularJS not working on some browsers/devices

I'm using Angular on my site, but I've been having reports on it often not working. Often users have to try different browsers/devices to get it to work. On my computer it works fine on Chrome, Opera and Firefox, latest versions. I've had reports of the page not working for visitors when using Firefox (version 31.6.0) and Safari though.
I have a smartphone of brand Öwn (Chilean or Peruvian I think), and the angular code does not work on this phone. I've tried using Chrome and the Öwn browser (some browser of their own). I have expandable content powered by jQuery, and that works fine, so it's definitely only Angular the page has problems with.
I tried removing all dependencies (using ngAnimate and ui.bootstrap for datepicker, and ngDialog), but still doesn't work on my phone.
I'm sorry I don't have more details. This is the page where the problems happen:
https://www.easterisland.travel/tours/
Does anyone have a clue? Thank you!
The problem in the end was in the code of an Angular function. When declaring a new object, I hadn't applied a value to one of the variables. This:
var tourObj = {groupId: groupId, pricePP: pricePP, savingsPP};
should have been this:
var tourObj = {groupId: groupId, pricePP: pricePP, savingsPP: savingsPP};
It was tricky since some browsers accepted it (Chrome and later Firefox) but many didn't. To locate the problem I checked error console of Safari Mac, and all it said was that angular.min.js.map and angular-animate.min.js.map were missing. .map files are for showing debug messages with minified code. Once the .map files had been added (find .map files for angular here, clicking folder for your angular version), the error console showed me exact location of the error.

ng-click $event not working in Mozilla Firefox

I was checking the angular doc for ng-click and I found a strange bug in firefox
https://docs.angularjs.org/guide/expression#-event-
The example given in the above link is working in chrome and opera, but it is not showing me $event properties in Mozilla firefox. The version i m using is 33.0.
Please let me know if there is an alternative to user event attribute in Mozilla firefox
I saw that the angularjs version is 1.5 which is not release yet.
Try to use the angularjs 1.4.8 version.

AngularJS 1.3 with ngbp framework doesn't load in chrome browser when using ng-strict-di

I'm working on an AngularJS web app using the ngbp framework (formerly ng-boilerplate) which by default uses AngularJS 1.2. The project is in early stages so we're experimenting with using AngularJS 1.3 instead of 1.2, as it has some nice features we'd like to make use of. We're also working under the assumption that AngularJS 1.3 will likely be the release version by the time we go live.
So I simply switched the AngularJS version number in the bower.json file and everything seems to work fine in Chrome, Safari, and Firefox except for when I enable strict dependency injection (ng-strict-di). When strict DI mode is on I get the error below (more detail here), but it only occurs in Chrome (FF & Safari both still work as expected).
Failed to instantiate module ng due to:
Error: [$injector:strictdi] function($provide) is not using explicit annotation and cannot be invoked in strict mode
http://errors.angularjs.org/1.3.0-build.3121+sha.a4520a7/...)
at http://localhost:8080/assets/ngbp-0.3.2.js:87:12
at annotate (http://localhost:8080/assets/ngbp-0.3.2.js:3352:17)
at Object.invoke (http://localhost:8080/assets/ngbp-0.3.2.js:4036:21)
at runInvokeQueue (http://localhost:8080/assets/ngbp-0.3.2.js:3964:35)
at http://localhost:8080/assets/ngbp-0.3.2.js:3973:11
at forEach (http://localhost:8080/assets/ngbp-0.3.2.js:338:20)
at loadModules (http://localhost:8080/assets/ngbp-0.3.2.js:3954:5)
at createInjector (http://localhost:8080/assets/ngbp-0.3.2.js:3894:11)
at doBootstrap (http://localhost:8080/assets/ngbp-0.3.2.js:1494:20)
at bootstrap (http://localhost:8080/assets/ngbp-0.3.2.js:1509:12
It seems that for some reason the angular source code itself is failing the strict DI test and thus won't load in the Chrome browser from within the ngbp framework. The above error comes from a fresh clone of ngbp with the only change being the version of AngularJS (1.3), not from our actual project (though the error is the same in both cases). I know that this version of ngbp doesn't officially support Angular 1.3 but as I said the app seems to work just fine with this change, even though it fails this test. I'm wondering if anyone might have some insight into what is causing this error and whether or not it would be ill-advised to proceed with this combination of AngularJS 1.3 and ngbp (version: 0.3.2)? Is there something else within ngbp that needs to be changed along with the version of AngularJS?
If it helps I'm serving up the files locally via cd ../bin; http-server -p 8080. If any other information would help just let me know and I'd be happy to provide it if possible.
Thanks for your time.
EDIT: If it helps I tested on OS X 10.9.4 with the following browser versions:
Chrome (Version 36.0.1985.143)
64-bit Chrome (Version 37.0.2062.94)
Firefox (31.0)
Safari (Version 7.0.5 (9537.77.4))
Looks like you might be using batarang, it does not work well with ng-strict-di. Try disabling batarang from google chrome developer tools and the app should start normally again.
[edit] AngularJS batarang now support ng-strict-di since v0.5.0. This error should no longer happen.

Angular JS ui-router on Internet Explorer 8

Has anyone gotten the Angular JS ui-router quick-start to run in IE8? The quick start's here:
ui-router quick-start
It's working in chrome but not in IE8.
Thanks!
[Edit]
I have read the ie documentation under angular js but the fix provided doesn't seem to fix the issue (missing forEach method). The fix only addresses issues with angular js and not angular-ui-router.
The only thing that works is from an answer here: AngularJS - IE8 html template. The basically provides an implementation for forEach which is not supported in IE.
Can you try building off of master? There was a pull request merged just after the last release (https://github.com/angular-ui/ui-router/pull/392) that resolved some IE8 issues. Everything else should work fine AFAIK.

Resources