KnockoutJS 模板:错误“您的 jQuery.tmpl 版本太旧 - jQuery.tmpl 1.0.0pre”
我使用 v1.3.0beta 的最新 KnockoutJS 库时收到上述错误。 但是,这与以下 jquery 模板文件冲突:
//ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js
Where can I find the CDN version of Jquery.tmpl 1.0.0pre? 另外让我担心的是 Jquery 模板的主页声明它不再处于开发阶段并且不受积极支持。
I'm getting the above error using the latest KnockoutJS library using v1.3.0beta.
However, this is clashing with the following jquery template file:
//ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js
Where can I find the CDN version of Jquery.tmpl 1.0.0pre?
Also what worries me is Jquery template's homepage states that it is no longer in development and not actively supported.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法在 cdn 上找到较新版本的 jQuery.tmpl。
然而,Knockout 1.3(现在处于 RC 版本)包含一个本机模板引擎。这意味着您可以将 Knockout 与模板一起使用,而无需引用 jQuery.tmpl 等模板引擎。
在文档准备好之前,这里有几篇文章可以帮助描述它:
http://blog.stevensanderson.com/ 2011/08/31/knockout-1-3-0-beta-可用/
http://www.knockmeout.net/2011/09/ko-13-preview-part-1-native-template.html
您将无法使用 jQuery.tmpl 特定语法 (${variable}, {{each }} 等),但控制流绑定与标准绑定的体验基本相同。
KO 确实计划在稳定时支持 jsRender (jQuery 模板的后继者)。
I was not able to locate a newer version of jQuery.tmpl on cdn.
However, Knockout 1.3 (in RC right now) includes a native template engine. This means that you can use Knockout with templates without referencing a template engine like jQuery.tmpl.
Here are a couple of posts to help describe it until the docs are ready:
http://blog.stevensanderson.com/2011/08/31/knockout-1-3-0-beta-available/
http://www.knockmeout.net/2011/09/ko-13-preview-part-1-native-template.html
You would not be able to use jQuery.tmpl specific syntax (${variable}, {{each}}, etc.), but the control-flow bindings along with the standard bindings are a mostly equivalent experience.
KO does plan to support jsRender (the successor to jQuery templates) as well when its is stable.