title: Passing context to template through ngOutletContext in Angular2
body: <p>I have a component to which I am passing a template. Inside of this component I would like to pass context so that I could display data.</p>
  
  <pre><code>@Component({
    selector: 'my-component',
    providers: [],
    template: `
      &lt;template [ngTemplateOutlet]="templ" [ngOutletContext]="{isVisible: true}"&gt;
      &lt;/template&gt;
    `
  })
  export class MyElementComponent implements OnInit {
      @ContentChild(TemplateRef) templ;
      constructor(){}
  }
  </code></pre>
  
  <p>Now when using component inside of other component:</p>
  
  <pre><code>&lt;my-component&gt;
      &lt;template&gt;
          {{isVisible ? 'yes!' : 'no'}}
      &lt;/template&gt;
  &lt;/my-component&gt;
  </code></pre>
  
  <p>So in <code>my-component</code> I am passing a template which is handled in it's class by <code>@ContentChild</code> with name <code>templ</code>. </p>
  
  <p>Then, in <code>my-component</code>'s template i am passing <code>templ</code> to <code>ngTemplateOutlet</code> and additionally, I am passing context using <code>ngOutletContext</code> which has <code>isVisible</code> set to <code>true</code>.</p>
  
  <p>we should see <code>yes!</code> on the screen but it seems that context is never passed.</p>
  
  <p>My angular version:</p>
  
  <pre><code>"@angular/common": "^2.3.1",
  "@angular/compiler": "^2.3.1",
  "@angular/core": "^2.3.1",
  </code></pre>