JavaScript Error when using IE: Unable to get property 'apply'
When trying to run the default application, I get the error seen above. Using Chrome, this error doesn't show. From the research I've done, it appears that .apply() is not available in IE and needs some sort of shim to work properly. I've tried some of the suggestions, but haven't been able to get it to work.
What version of IE? I just made a major major update #151 (we now have AoT support and bunch of other things).
Can you wipe out the project and get latest?
Inside /Client/polyfills/ you'll see polyfills.ts this is similar to the one found in Angular-CLI for example.
You'll see some comments about providing shims for older browsers, you'd want to uncomment out a bunch of those core-js/** lines to get IE9-11 support.
Uncomment these ones:
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** 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';
Hope that helps!
Thanks, I'll pull down the latest, take a look and report back.
I've pulled down the latest, uncommented those lines in polyfills and tried running it. I'm getting completely different errors now:
After hitting F5 a couple of times:
I forgot to mention that I was testing things in IE11 before. I noticed that the webpack.config.vendor.js is gone now. How does the vendor.js file get built or is that gone?
It's gone now actually. I'll probably bring something similar back but it won't be so manual of a process.
Can you wipe out both the dist folders and do the below, just to see if anything is acting up?
npm run build:dev -- --verbose
I think the issue is that node-sass and sass-loader are missing from package.json. I just installed them and then it worked.
Just to confirm the fix for this issue. Removing the comments for the IE9-11 imports does work.
Next time slow down with the fixes. :)
NgConf tomorrow 🙈🎁 had to get it ready and you're right I had those installed but not saved. Want to make a quick PR to add them in the dependencies? @rphilp
I believe I dropped the PR with the dependencies. First time doing that though so apologies if I messed it up.
Don't see it @rphilp It's ok I can add it in there