import { NgModule , Directive , Input , TemplateRef , ViewContainerRef , OnInit } from "@angular/core" ; export class NgLetContext { $implicit : any = null ; ngLet : any = null ; } @ Directive ( { selector : "[ngLet]" } ) export class NgLetDirective implements OnInit { private _context = new NgLetContext ( ) ; @ Input ( ) set ngLet ( value ) { this . _context . $implicit = this . _context . ngLet = value ; } constructor ( private _vcr , private _templateRef ) { } ngOnInit ( ) { this . _vcr . createEmbeddedView ( this . _templateRef , this . _context ) ; } }