ViewChild and ContentChild are decorators to configure queries on the component’s template. They can be used for various purposes, such as querying the child component or projected contents. A better understanding of these two decorators and their corresponding life cycle hooks empowers developers to write robust Angular applications.
In a step-by-step approach with live coding, this talk explains.
1. Difference between ViewChild and ContentChild decorators
2. Various input parameters to define a ViewChild such as {static: true}
3. ngAftterViewInit and ngAfterContentInit life cycle hooks
4. Content projection to simplify ContentChild
5. Various types of ViewChild
a. ElementRef
b. ViewContainerRef
Attend this talk to master ViewChild and ContentChild to write reusable components and robust Angular applications.
Creator of Remult, remult.dev | Israel
Principal Security Engineer , Okta | Poland
Chief Technology Officer, Builder.io | USA
Developer Relations Engineer, Storyblok | Germany
CEO, push-based.io | Austria
Independent Consultant, Architect, Developer & Trainer, Poland
Frontend Software Engineer, Tech a Hike | Israel
Front End Tech Lead, Tikal | Israel
Developer Evangelist for Web and Cloud, UK
Front End Consultant and Trainer, Poland
Trainer & Consultant, AngularArchitects.io | Austria
Independent IT Consultant, owner of 13DSGN.COM, Poland
Google Developer Expert, CodeShotsWithProfanis | Greece
Teacher and Consultant, ngIndia | India
Senior Developer, Vue Storefront | Poland
Consultant and Author, softwarearchitekt.at | Austria
Principal UI Architect, Cisco | Canada
Sign up to receive updates about JS Poland, including workshops, speaker previews, ticket launches, JS Awards, JavaScript Master Podcast, Behind the Code Magazine, CFP details and other exclusive content. We won’t spam you and will only send you emails we genuinely think you’ll find interesting. You can unsubscribe at any time and you can find more information here.