import { Directive , Input , ElementRef , Renderer2 } from '@angular/core' ; import { UICarouselItemComponent } from "../ui-carousel-item/ui-carousel-item.component" ; @ Directive ( { selector : '[ui-lazy-load]' } ) export class UILazyloadDirective { @ Input ( "ui-lazy-load" ) uiLazyLoad : string ; constructor ( private el , private renderer ) { } load ( ) { let img = this . el . nativeElement ; if ( img . src ) return ; img . src = this . uiLazyLoad ; } }