In one of the views in my ember 1.10.1 app, while am trying to get controller for that particular view am getting error "this.controllerFor()" is not a function. My view's code is something like,
在我的ember 1.10.1应用程序中的一个视图中,当我试图获取该特定视图的控制器时出现错误“this.controllerFor()”不是一个函数。我的观点代码是这样的,
didInsertElement: function () {
var self = this,
controller = self.controllerFor('favorites');
---some code---
}