[ionic 4] master detail routing in tabs


these two ways works fine :

In template :

[href]="‘tabs/(contracts:contract/’+ contract.id + ‘)’"

In component :


But this one, doesn’t :

In component :

this.router.navigate( [ ‘tabs/(contracts:contract)’, {contract: contract} ]);



Syntax Error?
this.router.navigate( [ ‘tabs/(contracts:contract)’, {contracts: contract} ]);


I would pass only one contract.

Tab routing cannot use .navigate, only .navigatebyurl works

edit: I am not sure why that is, I believe it has to do with when using .navigate its changes (tabs:tabs) to %tabs:tabs%

Hi all.

I’m facing the same problem. Template href works, and navigateByUrl also works. But when I try to navigate imperatively with router.navigate it fails. The way the router builds the Url is different. I’m indicating the outlet but it’s appended instead of replaced.
Someone found a solution to navigate with the router.navigate method?