Credit to devdocs.io

angular 2.0_typescript

angular

NgTemplateOutlet

Experimental Directive

What it does

Inserts an embedded view from a prepared TemplateRef

How to use

<template [ngTemplateOutlet]="templateRefExpression"
          [ngOutletContext]="objectExpression">
</template>

Class Overview

class NgTemplateOutlet {
  constructor(_viewContainerRef: ViewContainerRef)
  
  
  ngOutletContext 
  ngTemplateOutlet 
  ngOnChanges()
}

Selectors

[ngTemplateOutlet]

Class Description

You can attach a context object to the EmbeddedViewRef by setting [ngOutletContext]. [ngOutletContext] should be an object, the object's keys will be the local template variables available within the TemplateRef.

Note: using the key $implicit in the context object will set it's value as default.

Constructor

constructor(_viewContainerRef: ViewContainerRef)

Class Details

ngOutletContext
ngTemplateOutlet
ngOnChanges()

exported from @angular/common/index, defined in @angular/common/src/directives/ng_template_outlet.ts

© 2010–2016 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/common/index/NgTemplateOutlet-directive.html