JavaScriptServices icon indicating copy to clipboard operation
JavaScriptServices copied to clipboard

Angular/Aurelia/React Template: IE9 Support

Open EduardTheThird opened this issue 10 years ago • 8 comments

Hi

Currently using the latest version of the generator, 0.6.1, the Angular 2 Template is broken in IE9 due to the browser not supporting WeakMaps.

weakmap

I've noticed that previously an effort was made to fix IE9 issues, https://github.com/aspnet/JavaScriptServices/issues/172. Thinking a shim could maybe be added to improve legacy browser support? IE10 and up is working beautifully 👌

weakmap2

EduardTheThird avatar Dec 01 '16 14:12 EduardTheThird

Also as per #504 we need to polyfill Object.assign for the Redux template.

SteveSandersonMS avatar Jan 02 '17 12:01 SteveSandersonMS

Also as per #386, we need to polyfill Promise for the Aurelia template.

SteveSandersonMS avatar Jan 16 '17 11:01 SteveSandersonMS

With regards to the Redux template ... I've just added

import 'es5-shim';
import 'es6-shim';

to boot-client.tsx (and made npm installs of course).

HaraldMuehlhoffCC avatar Jan 31 '17 19:01 HaraldMuehlhoffCC

Hi,

Is there any update on this. Have been experiencing the same issue as #891 and #926.

myolapais avatar Jun 20 '17 16:06 myolapais

Sorry but no. If there was an update it would be posted here already.

SteveSandersonMS avatar Jun 20 '17 17:06 SteveSandersonMS

Hi Steve, Thank you for your response. Is there any chance on this getting fixed. We followed the guide on browser support and are more than half way through our project.

myolapais avatar Jun 20 '17 18:06 myolapais

I can't speak for Aurelia and React as I'm not sure this fixes those, but for Angular you need these polyfills:


/***************************************************************************************************
 * BROWSER POLY FILLS
 */

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
 import 'core-js/es6/symbol';
 import 'core-js/es6/object';
 import 'core-js/es6/function';
 import 'core-js/es6/parse-int';
 import 'core-js/es6/parse-float';
 import 'core-js/es6/number';
 import 'core-js/es6/math';
 import 'core-js/es6/string';
 import 'core-js/es6/date';
 import 'core-js/es6/array';
 import 'core-js/es6/regexp';
 import 'core-js/es6/map';
 import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js';  // Run `npm install --save classlist.js`.

// import 'web-animations-js';  // Run `npm install --save web-animations-js`.

/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';

/**
 * Date, currency, decimal and percent pipes.
 * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
 */
// import 'intl';  // Run `npm install --save intl`.

MarkPieszak avatar Jun 21 '17 13:06 MarkPieszak

IE polyfills is no longer something we'd control from the code in this repo (or the templating repo). Since we're now moving to use the standard project structures for each SPA framework (e.g., Angular CLI, create-react-app), the decision on whether or not to include polyfills would come from the SPA frameworks themselves.

SteveSandersonMS avatar Feb 07 '18 15:02 SteveSandersonMS