Javascript 未捕获类型错误:this.transitiono不是函数

Javascript 未捕获类型错误:this.transitiono不是函数,javascript,ember.js,Javascript,Ember.js,我刚刚将我的应用程序升级到ember 2.1,在我的web浏览器控制台中出现以下错误: Uncaught TypeError: this.transitionTo is not a function 在我的url中,有一个名为direction的变量: http://localhost:4200/plates/new?direction=plates 然后我将其构建到我的控制器中: export default Ember.Controller.extend({ queryParam

我刚刚将我的应用程序升级到
ember 2.1
,在我的web浏览器控制台中出现以下错误:

Uncaught TypeError: this.transitionTo is not a function
在我的url中,有一个名为
direction
的变量:

http://localhost:4200/plates/new?direction=plates
然后我将其构建到我的控制器中:

export default Ember.Controller.extend({
    queryParams: ['direction'],
    direction: null,
    actions: {
        lastpage(){
            this.transitionTo(this.get('direction'));
            },
       save(...){
            },  

        },  
    }); 

这在我升级之前就可以用了。折旧了什么/如何修复此错误?

从控制器中,您需要使用
this.transitionoRoute
而不是
this.transitiono
。这在1.x的大部分版本中都已被弃用。

Controller
没有方法。这是一种
路由
的方法。控制器具有方法