import { Directive , ElementRef , NgZone , OnInit } from '@angular/core' ; Component @ Directive ( { selector : '[aerZone]' , } ) export class ZoneDirective implements OnInit { constructor ( private element , private zone ) { } ngOnInit ( ) { this . element . nativeElement . microtaskEmpty$ = this . zone . onMicrotaskEmpty ; } }