I have a child route that accepts :id and :type. They work individually and load the component assigned to them, but the component only loads once when they are used together id/:type and not again when the :id or :type is updated.
Examples:
myapp/1 -> This loads (for :id)
myapp/b -> This loads (for :type)
myapp/1/b -> This loads but only once (for combination of :id/:type)
myapp/2/b -> This doesn't load the component again (when :id is updated)
I can see the URL changing correctly in the browser for all the routes.
Code of child route class:
export const CHILD_ROUTES: Routes = [
{ path: '', component: TitleComponent },
{ path: ':id', component: TitleComponent },
{ path: ':id/:type', component: TitleComponent } //This componment doesn't load
];
The code used to change/manipulate the routes:
this.router.navigate(['/myapp', this.id]);
this.router.navigate(['/myapp', this.id, this.type]);
Please let me know if anything else is required.