使用Curly Braces在Internet Explorer上的AngularJS数据绑定问题

Jam*_*lly 9 html javascript internet-explorer angularjs

我在这做错了什么?我已阅读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>
Run Code Online (Sandbox Code Playgroud)

JavaScript的:

function Controller($scope) {
    $scope.test = "Hello world";
}
Run Code Online (Sandbox Code Playgroud)

我已经尝试添加兼容性指南中提到的步骤,但似乎没有解决它,除非我遗漏了一些明显的东西!

它应输出"Hello world",但在IE上输出{{test}}.

非常感谢.

Dan*_*yon 3

问题似乎不是 Angular 而是 jsfiddle

http://plunker.no.de/BL97Av/这适用于 IE9

另外,IE7或IE8的兼容性你自己决定。