@westyx-nexus/openfeature-provider-angular sub-package provides an OpenFeature Provider that wraps an existing NexusClient from @westyx-nexus/sdk-angular.
No second SSE connection is opened. The bridge subscribes to the same NexusClient that the rest of your app uses. Whenever the client replaces its in-memory snapshot (TTL poll or SSE push), the provider emits ProviderEvents.ConfigurationChanged so the OpenFeature SDK re-evaluates all flags.
Installation
.npmrc:
Wiring up in app.config.ts
APP_INITIALIZER ensures Nexus populates its cache before Angular renders, and setProviderAndWait completes before OpenFeature client calls are made.
Reading flags in a component
Using@openfeature/angular-sdk:
NgModule-based apps
Flag resolution
Boolean flags use
getFlag() (which returns is_active and applies a default). String, number, and object evaluations use getConfig().
Live updates
The provider callsclient.subscribe(listener) in initialize(). When the NexusClient replaces its snapshot (after TTL expiry or an SSE push event), the listener fires and the provider emits ProviderEvents.ConfigurationChanged. The OpenFeature SDK re-evaluates all flag clients, and UI using @openfeature/angular-sdk re-renders automatically.
onClose() unsubscribes the listener cleanly.
