1
我有以下控制器:Ember.js控制器方法返回的功能文字
Whistlr.OrganizationController = Ember.ObjectController.extend
location: (->
location = this.city+", "+this.country
return location
)
这在我的模板:
{{location}}
但是,而不是渲染一个字符串,如“新纽约,美国”烬呈现:
function() { var location; location = this.city + ", " + this.country; return location; }
我在做什么错在这里?
感谢您的详细解答。这正是我所需要的。 – nullnullnull