Skip to main content

Template fragments and type checking

Learn Template fragments and type checking (Module 5 · Templates and Data Binding, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

ng-template, ng-container and ngTemplateOutlet • An ng-template is a blueprint that Angular does not draw by itself, like an unused stamp. It renders only when something instantiates it. An ng-container is an invisible wrapper that groups things without adding an element to the DOM. ngTemplateOutlet says "draw this template here".

More lessons in Module 5 · Templates and Data Binding