import { Directive , Input , TemplateRef , ViewContainerRef } from '@angular/core' ; interface LetContext < T > { ngLet : T ; } @ Directive ( { selector : '[ngLet]' } ) export class LetDirective < T > { private _context : LetContext < T > = { ngLet : null } ; constructor ( _viewContainer , _templateRef ) { _viewContainer . createEmbeddedView ( _templateRef , this . _context ) ; } @ Input ( ) set ngLet ( value ) { this . _context . ngLet = value ; } }