Rendering & reactivity

Components

Mount a counter and inspect its bound inputs, projected content, and emitted values.

Angular 22.3.2 · trace
Lesson flow Parent host. Bound values. Child component. Rendered text.
Parent host
Bound values
Child component
Rendered text

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

  1. The fixture creates the parent dynamically. Angular mounts its counter with a required name, an optional unit, and a required quantity model.
  2. The name transform trims the value supplied by the parent. The unit keeps its default.
  3. A view query finds the label in the child template. Content queries find the note projected from the parent.
  4. Clicking the child button updates the model. Angular propagates its change to the parent signal and the child emits a separate changed event.
  5. The parent renames the counter and the fixture reads the new text from the child view.
  6. A second scenario toggles conditional views in the parent and child. Observe how the view and content query results grow and shrink.

Sources