Pass Data to a Dynamic ng-template using ngTemplateOutletContext in Angular

Share this video with your friends

Send Tweet

We’ve seen how to pass along a reference to a template to an Angular component and how to render it. Templates without actual dynamic data are boring however. Therefore in this lesson we learn how to leverage ngTemplateOutletContext to pass in data to an ng-template.