Comprehensive guide to modern Angular state management patterns, from Signal-based local state to global stores and server state synchronization.
| Local State | Component-specific, UI state | Signals, signal() | | Shared State | Between related components | Signal services | | Global State | App-wide, complex | NgRx, Akita, Elf | | Server State | Remote data, caching | NgRx Query, RxAngular | | URL State | Route parameters | ActivatedRoute | | Form State | Input values, validation | Reactive Forms |
| Use Signals for local state | Simple, reactive, no subscriptions | | Use computed() for derived data | Auto-updates, memoized | | Colocate state with feature | Easier to maintain | | Use NgRx for complex flows | Actions, effects, devtools | | Prefer inject() over constructor | Cleaner, works in factories |