我想在辅助路径中更改参数,但是它总是导致Cannot match any routes. URL Segment: 'customer;id=c164a566-7468-4752-b46d-e8d752d4eab9'
我当前的网址看起来像http://localhost:4200/#/lists/listdetail/(detail:customer;id=29b6874e-561d-4acc-80d7-bea88b719e3b//list:customer;mode=2)
现在,我想更改明细插座的id参数,但不更改URL的其余部分。
我尝试过
this.router.navigate([{ outlets: { detail: [detailPart, { id: id }] } }]);
或
this.router.navigate(
[{ outlets: { detail: [detailPart, { id: id }] } }],
{ queryParamsHandling: 'merge' }
);
或
this.router.navigate(
['', { outlets: { detail: [detailPart, { id: id }] } }],
{ queryParamsHandling: 'merge', relativeTo: this.route }
);
但它总是会为我生成一个网址,例如
"/lists/listdetail/(detail:customer;id=29b6874e-561d-4acc-80d7-bea88b719e3b//list:customer;mode=2)(detail:customer;id=c164a566-7468-4752-b46d-e8d752d4eab9)"
辅助路线是两次的