Aug. 16, 2023, 2:12 p.m. | Connie Leung

DEV Community dev.to




Introduction


In this blog post, I am going to describe how to use the new syntax to pass inputs to ngComponentOutlet to create dynamic components in Angular. Prior to Angular 1.16.2, Angular allows injector input in ngComponentOutlet to provide values. Developers define injection token and useValue to provide Object/primitive value in providers array. With the new way to pass input to ngComponentOutlet, developers can eliminate boilerplate codes to achieve the same results.





The Pokemon Tab component with Injector



// …

angular array blog blog post components developers dynamic frontend injection injector input inputs introduction object pass token tutorial value

Information Security Engineers

@ D. E. Shaw Research | New York City

Technology Security Analyst

@ Halton Region | Oakville, Ontario, Canada

Senior Cyber Security Analyst

@ Valley Water | San Jose, CA

Senior - Penetration Tester

@ Deloitte | Madrid, España

Associate Cyber Incident Responder

@ Highmark Health | PA, Working at Home - Pennsylvania

Senior Insider Threat Analyst

@ IT Concepts Inc. | Woodlawn, Maryland, United States