Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

DI Error in IE following shim installation #926

Closed
@im1dermike

Description

@im1dermike

I had created issue #891 where I was getting a 'WeakMap' is undefined error when I tried to load the ASP.NET Core Angular 2 app in IE10. @SteveSandersonMS suggested I import core-js which resolved the WeakMap issue, but now I'm getting this error:

SCRIPT5022: Error: DI Error
vendor.js, line 104835 character 13

The app works fine in all other browsers.

Activity

MarkPieszak

MarkPieszak commented on May 10, 2017

@MarkPieszak
Contributor

I'm not sure which shim you've used, but you need to have the correct shims to for IE support lower than IE11.
See here for a reference of what you'd need: https://github.com/MarkPieszak/aspnetcore-angular2-universal/blob/master/Client/polyfills/polyfills.ts#L6-L24

im1dermike

im1dermike commented on May 10, 2017

@im1dermike
Author

@MarkPieszak I ran the following:

npm install --save classlist.js
npm install --save web-animations-js

Then changed the top of my boot-client.ts file to look like this:

import 'core-js/shim';
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 'classlist.js';  // Run `npm install --save classlist.js`.
import 'web-animations-js';  // Run `npm install --save web-animations-js`.

import 'angular2-universal-polyfills/browser';
import { enableProdMode } from '@angular/core';
import { platformUniversalDynamic } from 'angular2-universal';
import { AppModule } from './app/app.module';
import 'bootstrap';
const rootElemTagName = 'app'; // Update this if you change your root component selector

The same issue remains.

im1dermike

im1dermike commented on Jun 1, 2017

@im1dermike
Author

Any update on this? It's not really OK that this library doesn't work in IE10.

SteveSandersonMS

SteveSandersonMS commented on Jun 5, 2017

@SteveSandersonMS
Member

We have an existing issue tracking support for older IE versions at #484. I'll close this as a duplicate of that.

It's not really OK that this library doesn't work in IE10.

The template isn't meant to support all legacy browsers by default, as that would bloat the resulting application and not everyone needs that support. However I recognise that we could use clear docs on what polyfills are needed for people who do want to support legacy browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @im1dermike@SteveSandersonMS@MarkPieszak

        Issue actions

          DI Error in IE following shim installation · Issue #926 · aspnet/JavaScriptServices