If you use html5mode on IE9, IE8 it fails with 10 $digest() iterations r...

There was an issue with location.replace method isn't changing the location.href immediately.

This pull-request is the same like this one https://github.com/angular/angular.js/pull/2782 but for 1.0.x branch.