Skip to content Skip to sidebar Skip to footer

Angular And Ie8 -- Html5 Elements Not Styled Inside Ng-view

So I am trying to get angular working on IE8. I have followed all the steps on http://docs.angularjs.org/guide/ie and it seems to be working -- I see the content of ng-view rendere

Solution 1:

I was able to fix this by conditionally including jQuery in IE8 based on answer given here https://stackoverflow.com/a/18317832/2026098

Solution 2:

The problem here is that, even if you add a namespace and/or precreate your elements according to the IE guide there are certain parts of the angular core that don't pass through the normal jQuery element creation - I have had the issue persist even when using full jQuery instead of Angular's jQLite but I've heard that fixes things for most people. Using an HTML5 shim doesn't solve the issue on its own either.

But even so, I would prefer to not have to substitute jQuery if possible, in which case you'll need to also do the following to get a fully working solution:

  • Add reset styles for the block-level HTML5 elements so they display: block; correctly
  • Target the HTML5 elements with a colon prefix as well in your CSS. You need to escape these, it will look like this: header, \3A header { /*...*/ }. Note that there is a space between the escape sequence and the rest of the selector.
  • If you are using jQuery, you will need to use a 1.10.x version or conditional tags to switch to it in IE8.

Post a Comment for "Angular And Ie8 -- Html5 Elements Not Styled Inside Ng-view"