Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame^] | 1 | import { Component, Input } from '@angular/core'; |
| 2 | import { Subject } from 'rxjs/Subject'; |
| 3 | |
| 4 | @Component({ |
| 5 | selector : 'spinner-component', |
| 6 | templateUrl : './spinner.component.html', |
| 7 | styleUrls : ['./spinner.component.scss'] |
| 8 | }) |
| 9 | export class SpinnerComponent { |
| 10 | show : boolean = false; |
| 11 | static showSpinner: Subject<boolean> = new Subject<boolean>(); |
| 12 | |
| 13 | constructor(){ |
| 14 | SpinnerComponent.showSpinner.subscribe((status) => { |
| 15 | this.show = status; |
| 16 | }) |
| 17 | } |
| 18 | } |