Counter

A counter with increment, decrement and reset buttons, plus a label derived from the count. Look here for computed() and the UI components in a small app.

What it shows

  • signal() and computed() — label recomputes whenever count changes. See Signals and change detection.
  • update() and set() — the handlers change state, and Angular re-renders after each one.
  • UI components — Button and Card from the UI components. A button reports taps through its (pressed) output.
  • Flex layout — the button row sets display: flex with the flex flex-row classes. Without it, Lynx stacks children vertically. See CSS on Lynx.