I am using Angular 5. I have one in app.component. I am dynamically routing to a particular component say 'dashboard'. this dashboard component have a named router-outlet and a set of child components. Now I have to change the content of the named router-outlet from dashboard component through router navigation. I have tried following navigation
1. this.router.navigate([{ outlets: { right: 'temp1' }}], {redirectTo: this.activatedRoute})
2. this.router.navigate(['/dashboard',{ outlets: { right: 'temp1' }}])
But both are failing and getting following error
ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'dashboard'
While I am changing the browser url then its working but couldn't load through the navigation. I think its because of the parent . Any help would be appreciated.