RTYX
RTYX

Reputation: 1334

Angular: How to update queryParams without changing route on a template

There is a similar question here but it is not referred to the template.

What I want is to create a link that simply adds or modifies a queryParamenters in the currently -unkwown- route.

<a [routerLink]="[¿¿¿???]" [queryParams]="{ pageIndex: 3 }"
 {{ 3 }}
</a>

Upvotes: 0

Views: 106

Answers (1)

RTYX
RTYX

Reputation: 1334

Okay, it seems it's as easy as:

<a [routerLink]="[]" [queryParams]="{ pageIndex: 3 }"
 {{ 3 }}
</a>

Upvotes: 1

Related Questions