State & Data Flow
Application state in the Provision Portal UI is managed with Angular signals and the
@ngrx/signals Signal Store — there is no NgRx @ngrx/store/effects setup.
Building blocks
| Mechanism | Role |
|---|---|
|
Collection state with async methods — e.g. |
Plain signal services |
Simple shared state — |
Component signals |
Local view state inside standalone components ( |
Data flow (high level)
-
A component calls a store method (e.g.
userStore.load()) or a service method. -
In the Signal Store, an
rxMethodsetsisLoading, calls the backend through the service, and `patchState`s the result (or clears loading on error). -
Components read state via the store’s signals and render it; changes propagate reactively.
Server config as shared state
ServerService fetches ui/server/configuration once and caches it in a readonly signal (and
sessionStorage). Guards and components read this signal to drive feature flags — for example the
Deactivate Service page is gated on deactivateService.enable.
Subscription lifecycle
Components with manual subscriptions extend BaseComponent, which exposes a destroy$ subject and
completes it in ngOnDestroy; those components use takeUntil(this.destroy$) for teardown. Signal
Store `rxMethod`s manage their own subscription lifecycle.