import { Component } from '@angular/core' ; import { asapScheduler } from 'rxjs' ; import { observeOn } from 'rxjs/operators' ; import { BusyService } from './core' ; @ Component ( { selector : 'aw-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.scss' ] } ) export class AppComponent { busy = false ; constructor ( busyService ) { busyService . busy$ . pipe ( observeOn ( asapScheduler ) ) . subscribe ( is => this . busy = is ) ; } }