使用大括号的 Internet Explorer 上的 AngularJS 数据绑定问题
AngularJS Data Binding issue on Internet Explorer using Curly Braces
我在这里做错了什么?我已经通读了IE兼容性指南,但没有提到使用{{}}标签的数据绑定。这在其他浏览器上工作正常,但在IE(包括IE9)中失败。
http://jsfiddle.net/yMgQ8/1/
.HTML:
<html ng-app class="ng-app">
<head></head>
<body>
<div ng-controller="Controller">
<p>{{test}}</p>
</div>
</body>
</html>
JavaScript:
function Controller($scope) {
$scope.test = "Hello world";
}
我尝试添加兼容性指南中提到的步骤,但这似乎并不能解决它,除非我错过了一些明显的东西!
它应该输出"Hello world",但在IE上它输出{{test}}。
非常感谢。
问题似乎不是角度问题,而是 jsfiddle
http://plunker.no.de/BL97Av/这在IE9中有效
此外,IE7或IE8兼容性您只能靠自己。
供将来参考; 在 html 元素中添加 id 属性解决了我的问题。在您的情况下,这意味着将代码更改为:
<html ng-app id="ng-app" class="ng-app">
相关文章:
- 使用大括号的 Internet Explorer 上的 AngularJS 数据绑定问题
- Javascript:检测Internet Explorer是否发送了https页面上的混合http消息
- 在没有F12工具的情况下恢复Internet Explorer上的javascript日志和错误
- Highcharts 4.0.4 Internet Explorer上的导出问题
- Internet Explorer 10 上的高图表呈现
- Youtube IFrame Internet Explorer上的Fancybox错误
- 使用jQuery的Internet Explorer上的Javascript错误,但在Firefox上工作正常
- Internet Explorer 上的 jQuery 弹出菜单
- 对象引用未设置为Internet Explorer上的AngularJS中的对象的实例
- Internet Explorer 9上的Javascript未处理字符NULL(ASCII 0)
- 为什么Internet Explorer会弹出窗口;存储“;存储数据的窗口上的事件
- Window.Open()正在更改Internet Explorer上的页面布局
- PrimeFaces”;此页面上的脚本导致Internet Explorer运行缓慢“;DataTable出错
- 使用脚本标记检测Internet Explorer上的xml加载失败
- 如何在Internet Explorer中从网页上的javascript调用.Net控件或类库
- 本地机器上的Javascript -如何在不更改Internet Explorer安全设置的情况下禁用限制
- Internet Explorer上的可见面板CSS
- internet explorer上的jquery ajax问题
- Internet Explorer上的本地存储无法工作
- internet explorer-Javascript警报不适用于Xbox One上的浏览器MSIE