feat: add progress bar (#66)

Add progress bar for loading data via http requests.

Fixes #65
This commit is contained in:
Abhay Chawla
2018-06-26 17:01:43 +05:30
committed by GitHub
parent 65e1d1ffc2
commit 32b94503dd
6 changed files with 88 additions and 1 deletions
+1
View File
@@ -18,6 +18,7 @@
<mat-sidenav-content>
<mifosx-toolbar [sidenav]="sidenav" (collapse)="toggleCollapse($event)"></mifosx-toolbar>
<mat-progress-bar [mode]="progressBarMode"></mat-progress-bar>
<mifosx-breadcrumb></mifosx-breadcrumb>
<mifosx-content></mifosx-content>
+7 -1
View File
@@ -3,6 +3,7 @@ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { ProgressBarService } from '../progress-bar.service';
@Component({
selector: 'mifosx-shell',
@@ -16,10 +17,15 @@ export class ShellComponent implements OnInit {
map(result => result.matches)
);
sidenavCollapsed = false;
progressBarMode: string;
constructor(private breakpointObserver: BreakpointObserver) { }
constructor(private breakpointObserver: BreakpointObserver,
private progressBarService: ProgressBarService) { }
ngOnInit() {
this.progressBarService.updateProgressBar.subscribe((mode: string) => {
this.progressBarMode = mode;
});
}
toggleCollapse($event: boolean) {