How to pass query parameters with a routerLink

QueryParams is routerLink where they can be passed like

<a [routerLink]="['/path']" [queryParams]="{id:'value'}">
 Details 
</a>

To pass query parameters to ts file.

this.router.navigate(['/path'], queryParams: { 'id': 'value'});

Leave a Reply

Your email address will not be published. Required fields are marked *