mercredi 4 décembre 2019

Same resource for multiple routes - EmberJS

I would like use routes like:

/seller
/seller/
/seller/123
/seller/456

I define my route-setup like this:

this.route('seller', { path: '/seller' });
this.route('seller', { path: '/seller/:sellerId' });

In other words, I would like to use the same controller for these two routes, this works fine when I call route directly in browser but when I call

get(this,'router').transitionTo('seller', id);

Ocurrs a warning(I will update the question with the error that occurs), probaly because is the same name of controller.... What I can do?




Aucun commentaire:

Enregistrer un commentaire