I’ve recently started learning EmberJS and I’m trying to write an application that works with Chrome/Firefox AND IE11. I’ve been running into a problem where the app will load and render just fine on Chrome/Firefox, but on IE11, the best that I can manage is a “navigation occurred” message in the console. I’ve tried turning on debug messages in environment.js but I get the same result and no new leads to go off of.
Yesterday I tried a different tack and generated the super-rentals app again, just to see if I could get the {welcome-page} to render on both Chrome/Firefox and IE11. Once again, Chrome/Firefox succeeded; IE11 failed to render anything.
I’ve been scratching my head over this one for a few days now. To me, it seems like it has to do with the fact that IE11 reads and renders code differently than Chrome/Firefox. I would have also guessed I’m missing a polyfill or two for IE11, but I’m not certain how I could track that down if that’s the case. Finally, I’m floored that simply generating super-rentals for the {welcome-page} alone doesn’t render in IE11.
What could be happening here and what suggestions can be offered to follow up on?
Look at config/targets.js. It determines which browsers your build will support.
Out of the box, it will support IE11 for production builds, but not in development, because the level of transpilation required for IE11 makes the code harder to read.
To do development against IE11 you would just edit that file so that ie 11 is always in the browsers list.
Right, I would not expect it to work while doing local development on a newly generated app. We intentionally exclude IE11 from the list of development mode targets during ember new foo. It should be quite straight forward to update config/targets.js to support IE11 even in develoment (as @ef4 mentioned above).
I am always using ember deploy production so forgot you need to add --environment= for the build command. Just tested and can confirm IE11 works without adding the includePolyfill: true in the production build.
Thank you everyone for your helpful suggestions. I tried each and every one in turn, but unfortunately I wasn’t able to get IE11 to render. Per your suggestion, rwjblue, I ran ember new fooember serve --environment=production
but even good ol’ Foo won’t render a {welcome-page} on IE11.
You can see that in the console, I’m not even getting any errors, so I don’t even get the pleasure of having a rabbit hole to fall down/debug.
I did try adding includePolyfill: true to my ember-cli-build.js, but that didn’t have any effect on the resulting blank page.
I’m wondering if this is environmental, but I’m not sure where to begin with determining if it’s something purely on my end. After all, broerse hadn’t encountered any issues with rendering. But it just seems odd that I can’t even get ember new footo render a {welcome-page}. Is there something else here that I’m missing?
That’s true! However, I don’t have an option for 11. I understand that they’re not identical but I wouldn’t expect that to be the cause of all my problems, since I’ve just as easily changed it to 10 and still found that it doesn’t render. But if there’s some special case I should be handling for Edge versus 11, I’m all ears!
Lets say it is not the Documentmodes. We can check if it is your Ember Nodejs stack by checking if you see a blank page when you go to https://bloggr.exmer.com This Ember page works in IE11 on Windows 10.
FWIW, the welcome page addon is not included in production builds (it is stripped). This would explain why you had a blank screen but no errors (there just wasn’t any content in the application template).
That would definitely explain a lot… but just to be sure, I tried ember s --environment=development simply to be certain and I’m still receiving a blank page.
Interestingly, I took down the code of the initial app (my work-related stuff, not super-rentals related) and tried ember s on it and found that it renders fine but not when building on the server, which suggests to me that at least my code is fine; it’s the build process that is an issue. And it’s here that I think I’m on my own.
Thank you broerse and rwjblue for your suggestions and help. I appreciate everything you’ve both done very much.