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
Fullstack Developer, The Guild Software | Poland
Principal Security Engineer , Okta | Poland
Developer Relations Engineer, Storyblok | Germany
Chief Technology Officer, Builder.io | USA
CEO, push-based.io | Austria
Independent Consultant, Architect, Developer & Trainer, Poland
Frontend Software Engineer, Tech a Hike | Israel
Software Development Cook, Teacher & Coach, GDE | France
Front End Tech Lead, Tikal | Israel
Junior Software Engineer, Digital Hub Warsaw, Bayer | Poland
Developer Evangelist for Web and Cloud, UK
Google Developer Expert, Austria
Front End Consultant and Trainer, Poland
Trainer & Consultant, AngularArchitects.io | Austria
Lead Software Engineer, Digital Hub Warsaw, Bayer | Poland
Senior Developer, Vue Storefront | Poland
Google Developer Expert, CodeShotsWithProfanis | Greece
Independent IT Consultant, owner of 13DSGN.COM, Poland
Teacher and Consultant, ngIndia | India
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.