在router-outler我们做的事情中强制设置路线参数:
this.router.navigate(['/hero', hero.id]);
Run Code Online (Sandbox Code Playgroud)
如何在命名出口中强制设置路由参数?
this.router.navigate([{ outlets:{modal: 'modal/user'} }]);
Run Code Online (Sandbox Code Playgroud)
现在我连接字符串以设置路由参数:
this.router.navigate([{ outlets: {modal: 'modal/user' + '/' + 'this.id'} }]);
Run Code Online (Sandbox Code Playgroud)