Angular 22 · Signals and services

Run code when signals change

Run a side effect whenever the signals it reads change.

effect(() => {
  console.log('Count is', this.count());
});

Official Angular 22 documentation

More signals and services commands

All signals and services commands · Angular 22 cheatsheet

Was this page helpful?