1

I am attempting to run an angular application (version 4) on IE11. I have found a solution that I need to uncomment lines from polyfills.ts

However, I am unable to locate that file.

Is it possible that I do not have that file, if so what is the best course of action to take in order for the application to be able to run on IE11?

I am getting the following error: "**Unable to get property 'apply' of undefined or null reference"

1
  • Add the error to the question. Also what file are you talking about? Commented Jun 23, 2017 at 14:11

1 Answer 1

3

I figured out the answer by combining a couple of answers.

First, I never did find the polyfills.ts file, it is not in my project but I did not need it.

In order to fix this problem, I went to my boot-client.ts file and added the following three lines at the top:

 import 'reflect-metadata';
 import "core-js/client/shim"; 
 import 'zone.js';

This answer was provided to another question, however I added these lines to the boot-client.ts rather than the polyfills.ts file since I did not have that in my project.

Sign up to request clarification or add additional context in comments.

2 Comments

And don't forget to add typings: npm install --save @types/core-js
This worked for me too when using the aspnet core 2.0 angular template. However I only had to add import "core-js/client/shim" as described in the answer to my boot.browser.ts.

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.