The componentRouter doesn't work with IE 11 and Safari for windows 5.1.
IE 11 : no supports method String.startsWith()
Safari for Windows 5.1 : no supports object Map.
@petebacondarwin any idea ?
There is no startsWith in the angular code base, at least I haven't found one. Not sure where this is coming from, it's probably on your end.
In angular1 componentRouter, there is 4 .startsWith().
See here : https://github.com/brandonroberts/angularjs-component-router/blob/master/lib/angular_1_router.js
on lines 664, 666, 1148 and 1653.
We should be providing shims for this stuff.
Thanks @petebacondarwin .
These are the IE shims needed for Angular 2:
<!-- IE required polyfills, in this exact order -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
<script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
You can read more here: https://github.com/angular/angular/issues/7144
Oh sorry I was thinking about the component helper ...
Am 03.03.2016 20:03 schrieb "Pete Bacon Darwin" [email protected]:
These are the IE shims needed for Angular 2:
<!-- IE required polyfills, in this exact order --> <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script> <script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
You can read more here: angular/angular#7144
https://github.com/angular/angular/issues/7144—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular.js/issues/14172#issuecomment-191913733
.
@Narretz No problem ;o)
Including the polyfills solves the problem for me, thanks!
Any info on how this issue will be resolved in the future? Will eventually Component Router code be compiled to ES5 and provided in NPM package? Because so far using Component Router with Angular 1.5 seems to drop IE support and providing polyfills in the index.html or babel-polyfill in NPM seems like an ugly solution...
We are currently reviewing the Component Router (in Angular 2) and there may be yet more significant changes before it can be rolled out to Angular 1. So I can't say right now what shims will be needed.
We have added the shims to the installation instructions. We also have to update the guide. That is tracked here: https://github.com/angular/angular.js/issues/14655
I think this issue is resolved for the time being.
I faced similar case but different problem.
Issue: My local url looks something like this : "localhost:8080/AppSearch/#!/home/id". Using angular.js 1.6.2 with Spring MVC. When I run in the local host with IE as default browser, it shows up as "localhost:8080/AppSearch/" but with chrome browser I get the entire url. But if I paste the entire url in IE browser separately, it works. Already using "Shims". Can't the reason for this behavior.
Most helpful comment
We are currently reviewing the Component Router (in Angular 2) and there may be yet more significant changes before it can be rolled out to Angular 1. So I can't say right now what shims will be needed.