vendredi 15 septembre 2017

Ember.js route transitionTo method not working

I have a nested route, and from the action I am transitioning to a different route with query-params, but transitionTo does nothing, doesn't even report an error.

The helper works fine, though. But I need to do it with an action.

routes.js:

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

child-route1:

actions: {
    doTransit() {
        this.transitionTo('parent-route.child-route2', {query-params: {'param1': '1', 'param2': '2'}});
    }
}

I have never seen this problem before, what could I be doing wrong?

May be the extra route-name I put in the routes.js file in child-route2? But I need that path there so the URL shows that stuff. Any help, please?




Aucun commentaire:

Enregistrer un commentaire