Skip to content

Commit b1bb6b9

Browse files
majahendzel-vajakNatonek
authored andcommitted
fix(blog): search eng articles
1 parent bbbf3ba commit b1bb6b9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libs/blog/search/feature-search/src/lib/feature-search/search-dialog/search-dialog.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import {
1414
} from '@angular/core';
1515
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
1616
import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
17-
import { NavigationEnd, Router, RouterLink } from '@angular/router';
17+
import {
18+
ActivatedRoute,
19+
NavigationEnd,
20+
Router,
21+
RouterLink,
22+
} from '@angular/router';
1823
import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
1924
import { FastSvgComponent } from '@push-based/ngx-fast-svg';
2025
import { debounceTime, filter, startWith, tap } from 'rxjs';
@@ -64,6 +69,7 @@ export class SearchDialogComponent implements OnInit, OnDestroy {
6469
private readonly _router = inject(Router);
6570
private readonly _destroyRef = inject(DestroyRef);
6671
private readonly _localizeService = inject(AlLocalizeService);
72+
private readonly _activatedRoute = inject(ActivatedRoute);
6773

6874
@HostListener('click', ['$event.target']) onClick(target: HTMLElement): void {
6975
if (target.classList.contains('al-overlay')) {
@@ -128,6 +134,7 @@ export class SearchDialogComponent implements OnInit, OnDestroy {
128134
queryParams: {
129135
q: this.searchForm.value,
130136
},
137+
relativeTo: this._activatedRoute,
131138
});
132139
this.closeSearch();
133140
}

0 commit comments

Comments
 (0)