To set imperatively a route param in a router-outler
we do:
this.router.navigate(['/hero', hero.id]);
How do I imperatively set a route parameter in named outlets ?
this.router.navigate([{ outlets:{modal: 'modal/user'} }]);
Right now I concatenate string to set a route param:
this.router.navigate([{ outlets: {modal: 'modal/user' + '/' + 'this.id'} }]);
make sure your routing file have :id in modal component like this in mine
and your calling route should be like this
|| will set default value if no value is specified
and your aux component should be like this
here is the live plnkr link https://plnkr.co/edit/5aP6MgTRzXr5Urq5fr2J?p=preview . i hope this will help :)