首页 > Web开发 > 详细

Angular js ie 7,8 兼容性

时间:2014-03-11 03:57:18      阅读:599      评论:0      收藏:0      [点我收藏+]

Angularjs  官网有云:

1)在html 里面 ,有ng-app 的标签里需要定义个id ,id=‘ng-app‘;

2)ie 7及以下版本需要json2.js或json3.js,主要用来解析json

3)ie8 以下需要自定义一些指令标签: ng-include,ng-pluralize,ng-view,ng:include,ng:pluralize,ng:view;

综合以上我们把代码总结为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html lang="en" ng-app="phonecat" id="ng-app">
<head>
    <!--[if lte IE 7]>
    <script src="js/json2.js"></script>
    <![endif]-->
    <!--[if lte IE 8]>
    <script>
        document.createElement(‘ng-include‘);
        document.createElement(‘ng-pluralize‘);
        document.createElement(‘ng-view‘);
 
        // Optionally these for CSS
        document.createElement(‘ng:include‘);
        document.createElement(‘ng:pluralize‘);
        document.createElement(‘ng:view‘);
    </script>
    <![endif]-->
</head>
</html>

  经实践中证明,it‘s very right !

Angular js ie 7,8 兼容性,布布扣,bubuko.com

Angular js ie 7,8 兼容性

原文:http://www.cnblogs.com/kukuchong/p/3591777.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!