1×
Become a member
to unlock all features
Autoplay

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

    angularAngular
    5 - 6

    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.