Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

Create Dynamic Components in Angular

via egghead.io

Overview

Dynamic data gives us the opportunity to build dynamic components. Dynamic components are reusable and make building large-scale applications so much easier. In this course, Juri Stumpflohner will take us through the specific use case of of creating a tabbed component which allows us to dynamically define new tabs.
On our journey of implementing this component we will learn about how we can dynamically instantiate components, leveraging the ComponentFactoryResolver and ViewContainerRef.
Furthermore we will explore how to define view templates, how to pass them to our dynamically instantiated components as well as how to pass data into those templates. All of this will be powered by ngTemplateOutlet and ngTemplateOutletContext.

Syllabus

  • Angular Tab Component Overview
  • Declare a Template within a Template using `ng-template` in Angular
  • Pass a Reference of an ng-template to a Component and Render it in Angular
  • Pass Data to a Dynamic ng-template using ngTemplateOutletContext in Angular
  • Define an Anchor Point Where to Render Dynamic Components in Angular
  • Dynamically Instantiate an Angular Component
  • Destroy a Dynamically Instantiated Angular Component

Taught by

Juri Strumpflohner

Reviews

4.4 rating at egghead.io based on 214 ratings

Start your review of Create Dynamic Components in Angular

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.