angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Angular 4 not working in IE 11

Open imgregduh opened this issue 8 years ago • 5 comments

Versions

cli version : 1.6.4
node version: 8.9.4
npm version: 5.6.0

    "@angular/animations": "^4.4.6",
    "@angular/common": "4.4.4",
    "@angular/compiler": "4.4.4",
    "@angular/core": "4.4.4",
    "@angular/forms": "4.4.4",
    "@angular/http": "4.4.4",
    "@angular/platform-browser": "4.4.4",
    "@angular/platform-browser-dynamic": "4.4.4",
    "@angular/router": "4.4.4",

    "@angular-devkit/core": "0.0.28",
    "@angular/cli": "1.6.4",
    "@angular/compiler-cli": "4.4.4",
    "@angular/language-service": "4.4.4",

Repro steps

  • Step 1 ng build
  • Step 2 deploy
  • Step 3 run on IE 11

Observed behavior

Sometimes it loads in IE sometimes it doesnt, I am not sure what is going on but everytime it doesnt run in IE a guid is printed to the console in red text indicating some sort of error with it. The console seemed to output this 7c4a924e-e4f5-4290-9256-2cad90fe5f16 in red text with no other errors around it. Prior to this I was having "Can't execute freed script" error but I set the __Zone_enable_cross_context_check option to true and that error went away. Now I only get this error im reporting off and on after refreshing over and over again. Sometimes clearing the cache fixes it temporarily. I have asked other people to try to go to the url and sometimes they can and sometimes they cant.

Desired behavior

run application on IE

Mention any other details that might be useful (optional)

In firefox and chrome it works fine.

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/set';

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

/** IE10 and IE11 requires the following to support `@angular/animation`. */
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';

/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js';  // Run `npm install --save web-animations-js`.

/***************************************************************************************************
 * Zone JS is required by Angular itself.
 */
import './app.globals.ts'; //
import 'zone.js/dist/zone';  // Included with Angular CLI.
/***************************************************************************************************
 * APPLICATION IMPORTS
 */
/**
 * Date, currency, decimal and percent pipes.
 * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
 */
import 'intl';  // Run `npm install --save intl`.

app.globals.ts

(<any>window).__Zone_enable_cross_context_check = true;

imgregduh avatar Jan 23 '18 19:01 imgregduh

Did you just create a new application or was there any changes?

hansl avatar Jan 23 '18 23:01 hansl

This was in an existing application. After tracing where the problem could be from one of my interceptors that is not returning to the original request after i append an authorization token to the request. This is only happening in IE, I dont think this falls under the cli but angular itself

imgregduh avatar Jan 24 '18 21:01 imgregduh

Found to be an underlining coding issue deep within code with an error that was being suppressed. Closing issue

imgregduh avatar Jan 24 '18 22:01 imgregduh

Guys, i am using angular 4 and running the application in local machine & localhost url is not running.

For time being Googelchrome used and develop the app, Now the app moved to testing and facing some browser compatability issues. Could you please suggest me to resolve this issue.

kammanageswararao avatar Feb 15 '19 14:02 kammanageswararao

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.