|
|
@@ -1,14 +1,8 @@
|
|
|
import { Injectable, OnDestroy } from '@angular/core';
|
|
|
import { ActivatedRoute, Data, NavigationEnd, Params, PRIMARY_OUTLET, Router } from '@angular/router';
|
|
|
import { flatten } from 'lodash';
|
|
|
-import {
|
|
|
- combineLatest as observableCombineLatest,
|
|
|
- Observable,
|
|
|
- of as observableOf,
|
|
|
- share,
|
|
|
- Subject,
|
|
|
-} from 'rxjs';
|
|
|
-import { filter, map, startWith, switchMap, takeUntil } from 'rxjs/operators';
|
|
|
+import { combineLatest as observableCombineLatest, Observable, of as observableOf, Subject } from 'rxjs';
|
|
|
+import { filter, map, shareReplay, startWith, switchMap, takeUntil } from 'rxjs/operators';
|
|
|
import { DataService } from '../../data/providers/data.service';
|
|
|
|
|
|
export type BreadcrumbString = string;
|
|
|
@@ -39,7 +33,7 @@ export class BreadcrumbService implements OnDestroy {
|
|
|
takeUntil(this.destroy$),
|
|
|
startWith(true),
|
|
|
switchMap(() => this.generateBreadcrumbs(this.route.root)),
|
|
|
- share(),
|
|
|
+ shareReplay(1),
|
|
|
);
|
|
|
}
|
|
|
|