All files / src/app/common/spinner spinner.component.ts

100% Statements 7/7
100% Branches 0/0
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 271x 1x                                           1x 1x 1x  
import { Component } from '@angular/core';
import { NgRedux, select } from '@angular-redux/store';
 
// Place me last on the page to overlay page content.
 
@Component({
  selector: 'mwb-spinner',
  template: `
    <div class="loading-overlay" *ngIf="(activeRequests$ | async) > 0">
      <i class="center-fix main-spinner fa fa-spin fa-spinner"></i>
    </div>
  `,
  styles: [`
    i.fa-spin {
      font-size: 128px;
      font-weight: bold;
      position: absolute;
      top: 190px;
      left: 50%;
      color: #db3813;
    }
  `]
})
export class SpinnerComponent {
  @select(['ui', 'activeRequests']) activeRequests$: number;
}