Last active
June 27, 2018 07:54
-
-
Save GrillPhil/dba4963a08d3b4df1eb5b06f039a3437 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="blocking-loading-overlay" *ngIf="isLoading"> | |
<div> | |
<app-spinner [fill]="'#aaa'" [margin]="'20px auto'"></app-spinner> | |
<p>{{loadingMessage}}</p> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.blocking-loading-overlay { | |
background: rgba(0, 0, 0, 0.6); | |
position: absolute; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.blocking-loading-overlay > div { | |
background: white; | |
padding: 32px; | |
text-align: center; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { BlockingProgressService } from './blocking-progress.service'; | |
@Component({ | |
selector: 'blocking-progress', | |
templateUrl: './blocking-progress.component.html', | |
styleUrls: [ './blocking-progress.component.scss'] | |
}) | |
export class BlockingProgressComponent implements OnInit { | |
isLoading: boolean = false; | |
loadingMessage: string; | |
constructor(private _blockingProgressService: BlockingProgressService) {} | |
ngOnInit() { | |
this._blockingProgressService.isLoading.subscribe(value => { | |
this.isLoading = value; | |
}); | |
this._blockingProgressService.loadingMessage.subscribe(value => { | |
this.loadingMessage = value; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment