This is my router:
this.route('bundle', { path: 'bundles/:slug', resetNamespace: true }, function () {
this.route('pricing');
});
So there are two child routes: index
and pricing
.
Index is a listing of all the products in the bundle, while pricing is where you can purchase the bundle. When somebody purchases a bundle, the pricing
page displays a link-to
:
{{#link-to 'bundle' bundle.slug}}View Bundle{{/link-to}}`
This hits the model
hook of bundle.index
, but not of the parent route bundle
. I need to refresh the parent route's model after a purchase though because there are server-side changes to the model that need to be displayed in the front-end.
How can I make that happen?
didTransition
hook ofbundle
will also called whenpricing
orindex
route is loaded. I guess you can use that or else you can send an action from the child routes to the parent. – acid_srvnn:slug
in path. – Keo