角JS不是IE9工作,但与其他浏览器的工作原理 [英] Angular JS not working with IE9 but works with other browsers
本文介绍了角JS不是IE9工作,但与其他浏览器的工作原理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我工作的一个小应用程序,获取从API网址是这样的...
$ http.get(S_URL)
。然后(功能(RES){...
我的应用效果很好铬,野生动物园,Opera和Firefox,但显示IE9黑屏
我失去了我的HTML或js文件的东西吗?
以下是我在为我的IE浏览器的html文件...
<! - [如果LTE IE 8] GT;
<脚本SRC =JS / json2.js>< / SCRIPT>
<脚本>
使用document.createElement('NG-包括');
使用document.createElement('NG-复数');
使用document.createElement('NG-视图');
使用document.createElement('X-限制');
使用document.createElement('X-文件上传');
//您可以选择这些对CSS
使用document.createElement('NG:包括');
使用document.createElement('NG:复数');
使用document.createElement('NG:视图');
//定制标签
使用document.createElement('位置');
使用document.createElement('临时');
使用document.createElement('图像');
使用document.createElement('标题');
使用document.createElement('临时工');
使用document.createElement('remtemps');
< / SCRIPT>
百分比抑制率ENDIF] - GT!;
< DIV NG-视图>< / DIV>
< /头>
解决方案
尝试prefixing NG-应用和NG-观点与数据作为数据-NG-应用程序,数据-NG-视图。
So I am working on a small app that gets that from an API url like so... $http.get(s_url) .then(function(res) {... My app works well with chrome,safari,opera and firefox but displays a blank screen in IE9 Am I missing something in my html or js file? Here is what I have in my html file for IE...
<!--[if lte IE 8]>
<script src="js/json2.js"></script>
<script>
document.createElement('ng-include');
document.createElement('ng-pluralize');
document.createElement('ng-view');
document.createElement('x-restrict');
document.createElement('x-fileupload');
// Optionally these for CSS
document.createElement('ng:include');
document.createElement('ng:pluralize');
document.createElement('ng:view');
//customized tags
document.createElement('location');
document.createElement('temp');
document.createElement('image');
document.createElement('caption');
document.createElement('temps');
document.createElement('remtemps');
</script>
<![endif]-->
<div ng-view></div>
</head>
解决方案
Try prefixing ng-app and ng-view with data as in data-ng-app, data-ng-view.
这篇关于角JS不是IE9工作,但与其他浏览器的工作原理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文