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.
Angular2's (click) events doesn't work on IE 9 #172
Closed
Description
The (click)
event doesn't seem to work with a project generated with 'Aspnetcore Spa' generator.
=> can be tested on the "Counter" page
Though creating a "normal" node project (following the instructions from the Angular2's quick start) doesn't cause this problem.
Tested on IE 9 on Windows 7
Activity
laskoviymishka commentedon Jul 12, 2016
This should be addressed to angular2 team. I think there is only IE 10 support from box. Everything else require polyphils or god helps. For IE 9 i assume that only god could help you.
skamlet commentedon Jul 12, 2016
Thing is, with a freshly created angular 2 project running on node, I don't have this problem... But yeah, for IE 9 i'll also assume god is the only help :P...
laskoviymishka commentedon Jul 12, 2016
What does console say? Are you add polyphill? Can you provide more details about what difference between those 2 projects? Webpack config etc.
And pray to any god you know. It also may help you 🚢
MarkPieszak commentedon Jul 12, 2016
Angular2 should work on IE9 (but I believe the latest RC broke some IE9 support)
Do you have es6-shim or better yet, core-js shim?
You might need to wait for the next rc to hopefully have the fixes in.
skamlet commentedon Jul 13, 2016
@MarkPieszak I tried with both, no success.
@laskoviymishka:
The NOT working project is using:
TSD: (also tried code-js here)
package.json (I also tried with rc4 versions for each of the angular dependencies)
The working project uses:
systemjs:
typings:
package.json:
I am unable to pinpoint what is at fault here :/
MarkPieszak commentedon Jul 13, 2016
The working project has rc.4 & core-js in its package.json
"core-js": "^2.4.0"
.This repo uses the older
tsd
and has es6-shim in it, core-js is much better.Typescript2 just went into
beta
, but I'm sure we'll want to switch this repo to use that, as well as an even newer typings system (@types), but I'm still trying to figure out whether it's available/working with the beta2 release from 2 days ago.For now? Just install core-js through
tsd
for now to your project, as well as adding core-js to your package.json dependencies.npm i core-js --save
@skamletskamlet commentedon Jul 13, 2016
Thanks for your help @MarkPieszak, I tried your recommendation but it still not working on IE9:
package.json:
tsd.json:
Am I missing something, should I change something in the webpack's configuration file too?
MarkPieszak commentedon Jul 13, 2016
The working one also has bootstrap, maybe that one for some reason has the IE9 fix you're missing? I'm surprised it isn't working already. Then again rc4 says IE9 tests have failed, so maybe you're hitting some of these.
skamlet commentedon Jul 13, 2016
I found something interesting
The
Index.cshtml
is using those two lines:if i replace them with a simple
<app>Loading...</app>
the application is only showing the "Loading..." text, it never loads the rest.For information I created the project following @SteveSanderson's blog post: http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/
MarkPieszak commentedon Jul 13, 2016
prerender module is what's using Universal to create the Angular page on the server side and send the entire rendered thing to the client. Webpack of course just links to where the webpack file is located.
It wouldn't load without those.
skamlet commentedon Jul 13, 2016
Ok, I think the problem is that the vendor.js generated from webpack is not loading correctly in IE 9
I've got the following error:
Object doesn't support the property or method "keys"
maybe core-js or es6-shim are not loaded at the right time...
MarkPieszak commentedon Jul 13, 2016
They should be loaded prior to everything else if possible (usually at the top of vendor)
Gimly commentedon Jul 22, 2016
I've got the exact same problem with IE11. Project straight out of yo works correctly in Chrome and Firefox, but in IE11 I get the same error as @skamlet. Interestingly, my computer's locale is also in French. Could it be an issue with the locale?
@skamlet did you find a workaround?
skamlet commentedon Jul 22, 2016
Hey @Gimly, I had to import
es6-shim
before anything else in theboot-client.ts
file:Gimly commentedon Jul 22, 2016
Awesome, it's working, thanks. Shouldn't that be added to the base project?
7 remaining items