Rendering & reactivity
Templates
Reorder a list, inspect the keyed DOM elements, and watch what changes when the enclosing template disappears.
Angular 22.3.2 · trace
Objective
Distinguish updating a live template from removing and recreating its view.
Transcript
Angular 22.3.2
- The list starts with two items. A pipe uppercases the bound names and each row has a stable key.
- Reversing the array changes the DOM order. The fixture compares the pear element before and after reordering.
- A mode change selects a different switch branch. Clearing the array renders the empty branch.
- Turning the enclosing @if off removes the restored list. Turning it back on creates new elements.
- The deferred scenario starts with a placeholder. Flipping the trigger on loads the detail component. Flipping it off leaves the details visible.