mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
Use 'ResolveEnd' to reset the config. Closes #101
This commit is contained in:
parent
8e4e4bf401
commit
6db86a6b25
|
@ -1,5 +1,5 @@
|
||||||
import { Inject, Injectable, InjectionToken } from '@angular/core';
|
import { Inject, Injectable, InjectionToken } from '@angular/core';
|
||||||
import { Router, RoutesRecognized } from '@angular/router';
|
import { NavigationEnd, NavigationStart, ResolveEnd, Router, RoutesRecognized } from '@angular/router';
|
||||||
import { Platform } from '@angular/cdk/platform';
|
import { Platform } from '@angular/cdk/platform';
|
||||||
import { BehaviorSubject, Observable } from 'rxjs';
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
import { filter } from 'rxjs/operators';
|
import { filter } from 'rxjs/operators';
|
||||||
|
@ -96,7 +96,7 @@ export class FuseConfigService
|
||||||
// Reload the default layout config on every RoutesRecognized event
|
// Reload the default layout config on every RoutesRecognized event
|
||||||
// if the current layout config is different from the default one
|
// if the current layout config is different from the default one
|
||||||
this._router.events
|
this._router.events
|
||||||
.pipe(filter(event => event instanceof RoutesRecognized))
|
.pipe(filter(event => event instanceof ResolveEnd))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
if ( !_.isEqual(this._configSubject.getValue().layout, this._defaultConfig.layout) )
|
if ( !_.isEqual(this._configSubject.getValue().layout, this._defaultConfig.layout) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user