import { Directive , ElementRef , Input } from '@angular/core' ; import { NgScrollbarState } from '../ng-scrollbar.model' ; @ Directive ( { selector : '[ngAttr]' } ) export class NgAttr { constructor ( private el ) { } @ Input ( ) set ngAttr ( attrs ) { for ( const [ key , value ] of Object . entries ( attrs ) ) { ( this . el . nativeElement as HTMLElement ) . setAttribute ( key , value ) ; } } }