mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
(FuseProgressBar) Hide the progress bar on NavigationCancel and NavigationError, closes #81
This commit is contained in:
parent
620583f99c
commit
bbd59ab6c3
|
@ -1,5 +1,5 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
|
||||
import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router } from '@angular/router';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { filter } from 'rxjs/operators';
|
||||
|
||||
|
@ -103,7 +103,7 @@ export class FuseProgressBarService
|
|||
});
|
||||
|
||||
this._router.events
|
||||
.pipe(filter((event) => event instanceof NavigationEnd))
|
||||
.pipe(filter((event) => event instanceof NavigationEnd || event instanceof NavigationError || event instanceof NavigationCancel))
|
||||
.subscribe(() => {
|
||||
this.hide();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user