Pass a Reference of an ng-template to a Component and Render it in Angular

Share this video with your friends

Send Tweet

For now, our TabComponent which renders a single tab within our TabsComponent container uses an ng-content component to render the content defined by the developer via Angular’s content projection mechanism. In this lesson we extend the tab to be able to take some variable template defined via ng-template and render it inside our tab using <ng-container> and ngTemplateOutlet.

LiveRoom
LiveRoom
~ 7 years ago

The given Github link is not working here. It gives a 404.

Juri Strumpflohner
Juri Strumpflohner(instructor)
~ 7 years ago

@LiveRoom Oh, I'm sorry about that. the correct link should be this one: https://github.com/juristr/egghead-create-dynamic-tabs-component-angular/tree/02-ng-container-and-template-outlet. I'm going to fix this immediately, thx for letting me know 👍