jquery.tmpl 和 jquery.tmplPlus 有什么区别?
我正在考虑开始在我的项目中使用 jQuery 模板引擎。
这两者有什么区别呢?另外,现在是开始使用 tmpl 的好时机吗,因为它仍处于测试阶段?
I'm thinking of starting to use the jQuery template engine in my projects.
What is the difference in these two? Also, is it a good time to start using tmpl since it's still beta?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
jquery.tmpl 已被弃用,并且不会以目前的形式进行开发。 jQuery UI 团队已经接管了模板项目,并将再次从头开始。
更多信息请点击此处
http://blog.jquery。 com/2011/04/16/official-plugins-a-change-in-the-roadmap/
http://wiki.jqueryui.com/w/page/37898666/Template
不幸的是,我依赖于现在已经流行的 jquery.tmpl 版本。我没有两次更改模板库,而是等待 jQuery UI 团队推出新的模板库。
jquery.tmpl has been deprecated and will not be developed in the present form. The jQuery UI team has taken control over the templating project and will start from scratch again.
More info here
http://blog.jquery.com/2011/04/16/official-plugins-a-change-in-the-roadmap/
http://wiki.jqueryui.com/w/page/37898666/Template
Unfortunately I'm relying on the version of jquery.tmpl that is out in the wild now. Instead of changing templating library twice, I'm waiting for the new template library to come out of the jQuery UI team.
根据 jquery-tmplPLus.js 第一行中的注释,答案相当简单:
The answer is rather trivial, according to this comment in the first lines of jquery-tmplPLus.js:
我会远离两者。 jquery.tmpl 是一个死胡同,看来你可以等待很长时间让 jquery 提供模板......(http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html )就我个人而言,我改用knockoutjs。它在 1.2.4 版本中使用 jquery.tmpl,1.3 beta 已经有了自己的模板。从我读到的内容来看,迁移似乎不会很痛苦...
您可以走的另一条路是主干js,尽管我对此不太了解。
I would stay away from both. jquery.tmpl is a deadend, and it seems you can wait a long time for jquery to provide templating... (http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html) Personally, I made the switch to knockoutjs. It uses jquery.tmpl in the 1.2.4 version, and the 1.3 beta already has its own templating. As from what I've been reading, it looks like the migration will not be very painful...
Another path you can go is backbone js, though I didn't know very much about it.