dimanche 19 janvier 2020

Using emberjs query parameters with a subroute 'transitionTo'?

I'm trying to 'transitionTo' a sub-route of the current route and the seems to be ignored - there's no error it just doesn't happen.

router.js

this.route('produce', function() {
    this.route('download-form');
    this.route('download-form-new', {path: '/:prlid_for_form/:prrefnum_for_form/download-form'});   
});

routes/produce

From the 'produce' route this works as you would expect,

this.transitionTo('produce.download-form');

... that is the current route becomes 'produce/download-form', ...but if I replace that with this ...

 this.transitionTo('produce.download-form-new', { queryParams: { prlid_for_form: "99", prrefnum_for_form: 'ABC'} });

... it gets executed without error but no transition takes place.

This is in Ember 3.8.




Aucun commentaire:

Enregistrer un commentaire