MVC3 jQuery的模板 [英] MVC3 jQuery templates

查看:229
本文介绍了MVC3 jQuery的模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想学习如何使用这个老ScottGu的博客文章使用jQuery模板:

I'm trying to learn how to use jQuery templates using this old ScottGu's blog post:

<一个href=\"http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx\" rel=\"nofollow\">http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx

从这里插件:

https://github.com/jquery/ jQuery的-TMPL / BLOB /主/ jquery.tmpl.min.js

但无论我做错了什么,或这篇文章是不相关了。

But either I'm doing something wrong, or this article isn't relevant anymore.

你能告诉我一个更好的和最新的最新的一个?

Could you show me a better and up-to-date one?

推荐答案

我写的关于jQuery的一个博客帖子模板一个星期左右前。有在得到它与MVC的工作没有特殊的魔力 - 只要确保你正在返回JSON / XML对象,并引用的是正确的数据,这一切都简单。您应该检查以确保您的模板匹配与你的控制器方法返回的数据。

I wrote a blog post about jQuery templates a week or so ago. There's no special magic in getting it to work with MVC - just make sure you're returning a JSON/XML object and are referencing the correct data and it's all straightforward. You should check to make sure your templates are matching up with the data being returned by your controller method.

从您的评论上面它实际上听起来像你的问题在​​于引用 jQuery的-TMPL 文件您引用之前的的jQuery 在你的头文件。

From your comment above it actually sounds like your issue lies in referencing the jquery-tmpl file before you reference the jquery file in your header.

这篇关于MVC3 jQuery的模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆