So I have a component with a
foo
Updated to match Angular 5+ api
ngOutletContext
was renamed to ngTemplateOutletContext
as per https://stackoverflow.com/a/37654077/301596
Once this lands https://github.com/angular/angular/pull/9042 it will work like this
<div *ngFor="let item of someArrayFromDataInput">
<template
[ngTemplateOutletContext]="{
item: item
}"
[ngTemplateOutlet]="tmpl"></template>
</div>
+
<some-component [data]="someArray">
<template let-item="item">foo {{ item }}<template>
</some-component>
// edit: landed
update Angular 5
ngOutletContext
was renamed to ngTemplateOutletContext
See also https://github.com/angular/angular/blob/master/CHANGELOG.md#500-beta5-2017-08-29
original
Looks like you are asking for the same feature requested in https://github.com/angular/angular/issues/8368 (NgTemplateOutlet)
Update
See How to repeat a piece of HTML multiple times without ngFor and without another @Component for working Plunker examples.