Angular · Middle · Question 74 of 75
How do you pass a template from a parent to customize how a child renders each item?
<app-list [items]="users" [itemTemplate]="row" />
<ng-template #row let-user>{{ user.name }}</ng-template>- ✓Correct answer: Pass a
TemplateRefas an input and render it in the child withngTemplateOutlet - 2Use
<ng-content>inside a loop - 3Child components can't render parent markup
Explanation
<ng-content> projects content once; a template can be stamped out many times with a different context for each item.