AngularUI - Compatible browsers

↘锁芯ラ 提交于 2019-12-19 09:58:58

问题


I tried to open the AngularUI website (http://angular-ui.github.io/) in IE8. UI was not rendered properly in IE8(working fine in latest version of chrome/firefox). This led me to search browser compatability of AngularUI modules. A discussion in the groups pointed me that AngularUI-bootstrap module does not support IE8( https://groups.google.com/forum/#!topic/angular-ui/8L0739rxdes) But could find the info for other modules listed below. UI-Utils UI-Modules NG-Grid UI-Router So the question is, Are these modules compatible with ie8. If yes, is there a desire to continue support in the future.


回答1:


Many of the AngularUI directives do work correctly in IE8 provided you don't configure them using the custom element option. The problem is that IE8 ignores any elements that aren't standard HTML, which obviously blows that approach out of the water.

Use attribute approach instead. For example, instead of:

<tabset>
    <tab ng-repeat="tab in tabs" heading="{{tab.name}}"></tab>
</tabset>

Use:

<ul tabset>
    <li tab ng-repeat="tab in tabs" heading="{{tab.name}}"></li>
</ul>



回答2:


Alternatively you can tell IE8 to use elements which are not known per default by using a script like this:

<script>
   document.createElement("tabset");
   document.createElement("tab");
   document.createElement("tab-heading");
</script>

This lets IE8 know that <tabset>, <tab> and <tab-heading> are valid elements.




回答3:


In addition to @Paul's correct answer, which by the way should be marked as the answer, here is the Angular teams explanations and how to correct them to work in IE8 Angular IE8 development guide. Also, it should be noted that the Angular team is officially dropping support for IE8 in Angular 1.3 and later, blog. So, if you need to support IE8, don't use Angular 1.3+, nor use any angular UI that uses 1.3+.



来源:https://stackoverflow.com/questions/18293118/angularui-compatible-browsers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!