From bbd59ab6c334d67902a5b0ca470850ca17f8496c Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Thu, 26 Jul 2018 10:33:23 +0300 Subject: [PATCH] (FuseProgressBar) Hide the progress bar on NavigationCancel and NavigationError, closes #81 --- src/@fuse/components/progress-bar/progress-bar.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@fuse/components/progress-bar/progress-bar.service.ts b/src/@fuse/components/progress-bar/progress-bar.service.ts index 1fde0423..5322dbdc 100644 --- a/src/@fuse/components/progress-bar/progress-bar.service.ts +++ b/src/@fuse/components/progress-bar/progress-bar.service.ts @@ -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(); });