Component Interaction
Component Interaction
This cookbook contains recipes for common component communication scenarios in which two or more components share information.
Contents
- Pass data from parent to child with input binding
- Intercept input property changes with a setter
- Intercept input property changes with
ngOnChanges()
- Parent calls an
@ViewChild()
- Parent and children communicate via a service
See the .
Pass data from parent to child with input binding
HeroChildComponent
has two input propert