IE9 Error when Injecting $location service and using html5mode

858 views
Skip to first unread message

Dave Baskin

unread,
Jan 31, 2013, 5:01:30 PM1/31/13
to ang...@googlegroups.com
Plunker: http://plnkr.co/edit/44B5KBOGqUFqa2kvAjMM

When browsing to this file (html5mode is true), IE9 produces the following errors:

Error: 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: ... $locationChangeStart ...
SCRIPT5022: 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: ... $locationChangeStart ...
angular.min.js, line 85 character 315

A redirect to the hashbang url is then performed (for example, from http://server/test to http://server/#!/test).  Is this a bug?  Or do you have to do additional configuration to support IE9 for html5mode(true) (like configuring the appropriate redirects on the server)?

Note that if you remove the injection of the $location service into the controller, the error goes away (and IE9 stays on the original URL).

Also, this page works fine in Chrome, of course.

Thanks,
-Dave

Oliver Merk

unread,
Feb 3, 2013, 10:34:52 AM2/3/13
to ang...@googlegroups.com
I think I'm seeing a similar error when injecting $locationProvider into  the function call to module().config() : 

var app = angular.module('enterprise', ['ui.bootstrap'])
    .config(function ($locationProvider, $routeProvider) {

...throws the error, while

var app = angular.module('enterprise', ['ui.bootstrap'])
    .config(function ($routeProvider) {

...does not.

Using IE9 with angular.js 1.1.2

Thanks,
Oliver
Reply all
Reply to author
Forward
0 new messages