internet-explorer-8 - IE8 中的 knockout.js 1.3 和 jquery templates 1.0pre 问题

标签 internet-explorer-8 knockout.js jquery-templates

我在使用 IE8 和最新版本(测试版)的 knockout.js 和 jquery 模板时遇到了一个重大问题。我不断收到以下错误。如果我删除 <div>在 trialogueRun 然后它不会出错。它发生在 jquery.tmpl.js 中的 buildTmplFn(markup) 函数中。

SCRIPT1028: Expected identifier, string or number 
jquery.tmpl.js, line 317 character 9


<script id="trialogueRun" type="text/html">
        <div data-bind="attr: { class: $data.AgentName }"></div>
</script>

最佳答案

让它与 IE8 一起工作。我早该知道 IE 会遇到“类”这个词的问题。

<div data-bind="attr: { 'class': $data.AgentName }"></div>

关于internet-explorer-8 - IE8 中的 knockout.js 1.3 和 jquery templates 1.0pre 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7854406/

相关文章:

css - ie8 忽略了我所有的字体声明

html - 带有最小高度和溢出的 IE8 错误 :hidden?

javascript - 无法读取未定义/KnockOut 的属性 x

javascript - knockout 不绑定(bind)值

jquery - jQuery jsrender.js 和 jquery.views.js 中父循环的 itemNumber 值

javascript - 有没有办法打破 JQuery 模板中的 {{each}} 循环

IE8 中的 Jquery UI : suspending sort behavior while resizing an element that is sortable and resizable

html - 为什么图像不显示在 IE8 的 DIV 中

javascript - 如何在 JavaScript 中调用属性(如方法)

jquery - 在 jQuery tmpl 中使用 "if"