Application bootstrap (omega-setup.ts)
This topic describes the composition root for Omega in a consumer app — similar in spirit to Angular’s app.config.ts documentation that lists which providers belong at bootstrap.
ng add omega-angular (or ng generate omega-angular:ecosystem) creates src/app/omega-setup.ts and merges omegaSetupProviders into app.config.ts.
What it contains
provideOmega(...)— wiresOmegaChannel,OmegaFlowManager, your flows and agents, and optional bootstrap (e.g.switchTo('auth')).- Router bridge — subscribes to a
navigator-style event and callsRouter.navigateByUrlwhen flows emit navigation intents. omegaSetupProviders— exported array forapp.config.ts.
Default ecosystem starter
Unless you use --minimal, the schematic also adds a login + home example: AuthFlow, createAuthAgent, authGuard, and routes. Opt out with:
bash
ng generate omega-angular:ecosystem --minimal
# or
ng add omega-angular --minimal-ecosystemFeature wiring
Each feature typically exposes:
- Flow and create…Agent factory from
**/omega/ - Registration in
createFlows/createAgentsinsideomega-setup.ts(or useng generate omega-angular:featureto merge automatically).
Keep HTTP and side effects in services and agents, not in dumb view components — aligned with the bundled ESLint rules.
Related guides
- Data flow — how bootstrap fits in the lifecycle
- Navigation & Router —
provideOmegaNavigationBridgepattern - Example app — full
omega-setup.tsinprojects/example
