Create Dynamic Components in Angular
Course on egghead by Juri Strumpflohner
- 24 min
- LengthVideo runtime
- Subscription
- Price modelegghead plan
- 7
- Lessons
- 4.0
- Rating out of 58 ratings on egghead
- Dec 2017
- Published18 Dec 2017
About this course
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 .
What it covers
- 1Angular Tab Component Overview
- 2Declare a Template within a Template using `ng-template` in Angular
- 3Pass a Reference of an ng-template to a Component and Render it in Angular
- 4Pass Data to a Dynamic ng-template using ngTemplateOutletContext in Angular
- 5Define an Anchor Point Where to Render Dynamic Components in Angular
- 6Dynamically Instantiate an Angular Component
- 7Destroy a Dynamically Instantiated Angular Component
Similar Angular courses
Same topic, nearest in length, up to three from any one provider.
Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.