Angular 2 and Internet Explorer 9
Just logging what is needed to use Angular 2 within IE9:
I’m using Angular 2.4.0 and was able to get it to work with IE9 with the following pollyfills:
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="node_modules/core-js/client/shim.min.js"></script>I had expected the core-js shim to provide full support for IE9 too but it was still missing some functions. Adding shims_for_IE seemed to work well.
With regards to routing in IE9, the following answer was helpful: How to bootstrap with HashLocationStrategy in Angular 2 RC5
Ref: http://stackoverflow.com/questions/34775684/what-is-required-to-use-angular-2-within-ie9
routing
export const routing = RouterModule.forRoot(routes, { useHash: true });
for enabling production mode, before loading root
NgModule
,
import { enableProdMode } from '@angular/core';
if (<condition to enable production mode>) {
enableProdMode();
}