Open trotyl opened 5 years ago
@Component({ template: ` <ng-template #dateCell let-date="date">{{ date | date:'yyyyMMdd' }}</ng-template> <bridged-comp [renderProp]="dateCell | renderable"></bridge-comp> ` }) class MyComp {}
Corresponding util function:
import { asRenderable, Renderable } from 'ng-render' @Component({ template: ` <ng-template #dateCell let-date="date">{{ date | date:'yyyyMMdd' }}</ng-template> ` }) class MyComp extends Renderable { @ViewChild('dateCell') dateCell: TemplateRef<{ date: Date }> render() { return ( <SomeComp renderProp={asRenderable(this.dateCell)}> ) } }
API Design
Corresponding util function: