This file contains 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
/* You can add global styles to this file, and also import other style files */ | |
/* Bootstrap */ | |
@import '~bootstrap/scss/bootstrap'; | |
@import "styles/spinner"; | |
This file contains 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 { Overlay, OverlayRef } from '@angular/cdk/overlay'; | |
import { ComponentPortal } from '@angular/cdk/portal'; | |
import { Injectable } from '@angular/core'; | |
import { SpinnerOverlayComponent } from '@app/core/spinner-overlay/spinner-overlay.component'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class SpinnerOverlayService { | |
private overlayRef: OverlayRef = null; |
This file contains 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="spinner-wrapper"> | |
<app-spinner></app-spinner> | |
</div> |
This file contains 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
.spinner-wrapper { | |
position: fixed; | |
width: 100%; | |
height: 100%; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
top: 0; | |
left: 0; | |
background-color: rgba(255, 255, 255, 0.5); |
This file contains 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, Input, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-spinner-overlay', | |
templateUrl: './spinner-overlay.component.html', | |
styleUrls: ['./spinner-overlay.component.scss'] | |
}) | |
export class SpinnerOverlayComponent implements OnInit { | |
@Input() public message: string; | |
constructor() {} |
This file contains 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="wrapper"> | |
<div class="overlay" *ngIf="showSpinner"> | |
<div class="spinner-wrapper"> | |
<app-spinner></app-spinner> | |
</div> | |
</div> | |
<div class="loaded-content" [class.blurred]="showSpinner"> | |
<ng-content></ng-content> | |
</div> |
This file contains 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
.wrapper { | |
width: 100%; | |
height: 100%; | |
} | |
.overlay { | |
position: absolute; | |
z-index: 1002; | |
background-color: rgba(255, 255, 255, 0.5); | |
width: 100%; |
This file contains 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="container"> | |
<div class="row"> | |
<div id="loader"> | |
<div class="dot"></div> | |
<div class="dot"></div> | |
<div class="dot"></div> | |
<div class="dot"></div> | |
<div class="dot"></div> | |
<div class="dot"></div> | |
<div class="dot"></div> |
This file contains 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 "~styles/spinner"; |
This file contains 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, Input } from '@angular/core'; | |
@Component({ | |
selector: 'app-spinner', | |
templateUrl: './spinner.component.html', | |
styleUrls: ['./spinner.component.scss'] | |
}) | |
export class SpinnerComponent implements OnInit { | |
@Input() message = ''; |