Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问一下 Backbonejs中的View实践 中模版中的变量提示不存在,该怎么解决 #27

Open
lional opened this issue Dec 24, 2014 · 2 comments

Comments

@lional
Copy link

lional commented Dec 24, 2014

后台开发使用的是 Node.js ,用Express 4 生成的一个项目, 页面的话是用默认的.ejs 而不是 .html

报错说 search_label is not defined , 请问有什么好的解决办法嘛?

@the5fire
Copy link
Owner

你传参数的时候肯定没传这个过去吧?

@tanshiqi
Copy link

var template = _.template($("#search_template").html())(context);
$(this.el).html(template);

这样就没有问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants