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