Skip to content

Commit

Permalink
fix: add preserveFragment to linkedQueryParam navigation extras (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
eneajaho authored Jan 10, 2025
1 parent 1bbd702 commit 316a5e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/ngxtension/linked-query-param/src/linked-query-param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type NavigateMethodFields = Pick<
| 'onSameUrlNavigation'
| 'replaceUrl'
| 'skipLocationChange'
| 'preserveFragment'
>;

/**
Expand Down Expand Up @@ -93,6 +94,7 @@ export class LinkedQueryParamGlobalHandler {
onSameUrlNavigation,
replaceUrl,
skipLocationChange,
preserveFragment,
} = config;
if (queryParamsHandling || queryParamsHandling === '') {
this._navigationExtras.queryParamsHandling = queryParamsHandling;
Expand All @@ -106,6 +108,9 @@ export class LinkedQueryParamGlobalHandler {
if (skipLocationChange) {
this._navigationExtras.skipLocationChange = skipLocationChange;
}
if (preserveFragment) {
this._navigationExtras.preserveFragment = preserveFragment;
}
}

/**
Expand Down

0 comments on commit 316a5e7

Please sign in to comment.