Itβs a pity that I am late, and it may be useless to you. I just wanted to post it here if this might be helpful to others.
This link helped me clear my problem.
Approach 1: We can provide a model for the route. The model will be serialized to the URL using the route serialization hook:
var model = self.store.find( 'campaign', { fb_id: fb_id } ); self.transitionToRoute( 'campaign', model);
This will work fine for routing, but the url can be changed. For this case, we need to add additional logic to serialize the object passed to the new route and to fix the URL.
Approach 2: If a literal (such as a number or a string) is passed, it will be treated as an identifier instead. In this case, the hook of the route model will be launched:
self.transitionToRoute( 'campaign', fb_id);
This will call the model () and correctly display the required URL when routing. setupController () will be called immediately after the model ().
2nd worked fine for me. Hope this is helpful and answers the above question.
source share