Here is my code:
<span *ngIf="markup.baseline">
<mat-icon [routerLink]="['/default-markup', markup.id]">edit</mat-icon>
</span>
<span *ngIf="markup.baseline == 0">
<mat-icon [routerLink]="[markup.id]">edit</mat-icon>
</span>
The first link where the url has to be 'default-markup/14' doesnt work. It works correctly for the second condition.
The error is
core.js:6014 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'default-markup/14
Here is the code in the routing module:
{path: ':client', component: MarkupsListComponent, },
{path: ':client/default-markup', component: MarkupsBaselineComponent,},
{path: ':client/default-markup/:rule_id', component: MarkupsBaselineComponent,},
{path: ':client/:rule_id', component: MarkupsDetailComponent,},
[routerLink]="[markup.id]"link?/beforedefault-markup. Try[routerLink]="['default-markup', markup.id]"