4

I have build my Angular application then run it in server.

I got errors that where not shown in localhost.

Unable to get property 'onHover' of undefined or null reference.

File Chart.min.js, ligne : 10, colonne : 115187

Error “SCRIPT 1028 Expected identifier, string or number”

File polyfills.bundle.js, ligne : 6399, colonne : 5 .

Object doesn't support property or method 'querySelector

File styles.bundle.js, ligne : 215, colonne : 2

Expected identifier

File: vendor.bundle.js, ligne : 3169, colonne : 23

I have uncommente imports in polyfills.ts

/** 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/weak-map';
 import 'core-js/es6/set';

//import 'classlist.js';  // Run `npm install --save classlist.js`.
import 'core-js/es7/reflect';

// import 'web-animations-js';  // Run `npm install --save web-animations-js`.
import 'zone.js/dist/zone';  // Included with Angular CLI.

Here's network trafic when loading app

enter image description here

4
  • And it works in other browsers? Commented Apr 12, 2018 at 10:46
  • Yes in Chrome and Firefox it's working Commented Apr 12, 2018 at 11:00
  • Then I guess the problem might be caused by polyfill being loaded too late? Commented Apr 12, 2018 at 11:02
  • I have added a screen shot of network trafic Commented Apr 12, 2018 at 11:12

1 Answer 1

4

Add meta tag in the index.html. This is also a necessary line.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.