Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/440.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Ember.js路由转换到方法不工作_Javascript_Ember.js_Routes - Fatal编程技术网

Javascript Ember.js路由转换到方法不工作

Javascript Ember.js路由转换到方法不工作,javascript,ember.js,routes,Javascript,Ember.js,Routes,我有一个嵌套的路由,从操作开始,我使用查询参数转换到另一个路由,但是转换到什么都不做,甚至不报告错误 不过,{{link to}帮助程序工作正常。但我需要行动起来 routes.js: this.route('parent-route', function() { this.route('child-route1'); this.route('child-route2', {path: '/child-route1/child-route2/:param1/:param2'});

我有一个嵌套的路由,从操作开始,我使用
查询参数
转换到另一个路由,但是
转换到
什么都不做,甚至不报告错误

不过,
{{link to}
帮助程序工作正常。但我需要行动起来

routes.js:

this.route('parent-route', function() {
    this.route('child-route1');
    this.route('child-route2', {path: '/child-route1/child-route2/:param1/:param2'});
  });
子路由1:

actions: {
    doTransit() {
        this.transitionTo('parent-route.child-route2', {query-params: {'param1': '1', 'param2': '2'}});
    }
}
我以前从未见过这个问题,我会做错什么

可能是我在
child-route2
中的
routes.js
文件中输入的额外路由名称?但我需要那个路径,这样URL就会显示这些内容。有什么帮助吗?

也许可以尝试使用

this.transitionToRoute('parent-route.child-route2', '1', '2')
也许可以尝试使用

this.transitionToRoute('parent-route.child-route2', '1', '2')