Rendering & reactivity
DOM rendering & hooks
Mount a cart row, change its quantity, and destroy it. Inspect the hooks and DOM text recorded in each pass.
Angular 22.3.2 · trace
Objective
Observe initialization, recurring checks, DOM updates, and cleanup in a real Angular component.
Transcript
Angular 22.3.2
- The browser fixture creates a cart row and provides the initial quantity. Its first input change precedes the initialization hook.
- An explicit check runs the content and view hooks. The fixture reads the DOM text after the check returns.
- Changing the quantity triggers another input change and the recurring checks. Initialization hooks run once for this component instance.
- A second explicit check with the same input runs the check hooks again. The rendered quantity stays the same.
- Destroying the row runs its destroy hook and registered cleanup. The fixture checks that its element was removed.
- The conditional scenario records parent and child separately, reads a projected note, and mounts a fresh child after removal through @if.
- The render callback scenario records separate write and read phases and observes an updated signal after rendering. These browser callbacks do not measure paint.
- On a direct page load, the hydration fixture records the counter element before Angular starts and compares it after the first client render. Reload this page directly to capture both versions.