import { Directive , Input } from '@angular/core' ; @ Directive ( { selector : '[nodeLogger]' } ) export class Nodelogger { @ Input ( ) nodeLogger ; ngOnChanges ( event ) { if ( event . nodeLogger . isFirstChange ( ) ) { console . log ( "Node logger ** instantiated **:" , this . nodeLogger ) ; } else { console . log ( "Node logger __ updated __:" , this . nodeLogger ) ; } } }