// Set our navigation extras object // that passes on our global query params and fragment let navigationExtras: NavigationExtras = { queryParamsHandling: 'preserve', preserveFragment: true }; // Redirect the user this.router.navigateByUrl(redirect, navigationExtras);
The queryParamsHandling feature also provides a merge option, which will preserve and combine the current query parameters with any provided query parameters when navigating.
References
https://angular.io/guide/router#query-parameters-and-fragments