fixed an issue with the AoT build

This commit is contained in:
Art Lowel
2018-04-26 11:58:32 +02:00
parent 2d0a43f91f
commit cb4c062ad9
3 changed files with 6 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
<ds-search-form id="search-form"
[query]="(searchOptions$ | async)?.query"
[scope]="(searchOptions$ | async)?.scope"
[currentUrl]="service.getSearchLink()"
[currentUrl]="getSearchLink()"
[scopes]="(scopeListRD$ | async)?.payload?.page">
</ds-search-form>
<div class="row">

View File

@@ -77,4 +77,8 @@ export class SearchPageComponent implements OnInit {
public isSidebarCollapsed(): Observable<boolean> {
return this.sidebarService.isCollapsed;
}
public getSearchLink(): string {
return this.service.getSearchLink();
}
}

View File

@@ -236,7 +236,7 @@ export class SearchService implements OnDestroy {
this.router.navigate([this.getSearchLink()], navigationExtras);
}
getSearchLink() {
getSearchLink(): string {
const urlTree = this.router.parseUrl(this.router.url);
const g: UrlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
return '/' + g.toString();