javascript - Ember transition to route on parent dynamic segments (slugs) -
i have current router.js
set up.
this.resource('parent', {path:'parent/:id'},function() { this.route('child', {path:'child/:name'}); });
pages valid www.x.com/parent/5/child/jimmy
, www.x.com/parent/5
using this.transitiontoroute('parent.child','jimmy');
me page www.x.com/parent/5/child/jimmy
.
using this.transitiontoroute('parent','5');
me page www.x.com/parent/5
.
since route nested, :id
parameter has effect on child route...
how transition www.x.com/parent/100/child/jimmy
? update in parent's dynamic segment :id
while maintaining child dynamic segments.
this.transitiontoroute('parent.child', '100', 'jimmy');
see http://emberjs.com/api/classes/ember.controller.html#method_transitiontoroute
"multiple models applied recursively last first resource tree."
Comments
Post a Comment