Rendering & reactivity
Components
Mount a counter and inspect its bound inputs, projected content, and emitted values.
Angular 22.3.2 · trace
Objective
Trace a value from a parent input to a child view, then follow model changes and output events back to the parent.
Transcript
Angular 22.3.2
- The fixture creates the parent dynamically. Angular mounts its counter with a required name, an optional unit, and a required quantity model.
- The name transform trims the value supplied by the parent. The unit keeps its default.
- A view query finds the label in the child template. Content queries find the note projected from the parent.
- Clicking the child button updates the model. Angular propagates its change to the parent signal and the child emits a separate changed event.
- The parent renames the counter and the fixture reads the new text from the child view.
- A second scenario toggles conditional views in the parent and child. Observe how the view and content query results grow and shrink.