feat: add progress bar (#66)
Add progress bar for loading data via http requests. Fixes #65
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user