Skip to main content
cngx-src documentation

CNGX_COMMIT_CONTROLLER_FACTORY

Tokenv0.1.0

InjectionToken<CngxCommitControllerFactory>

Description#

DI token carrying the factory that every cngx feature uses to allocate its commit controller. Default providedIn: 'root' factory returns createCommitController. Override globally via app providers or per-component via viewProviders.

Symmetrical to CNGX_SELECT_COMMIT_CONTROLLER_FACTORY (@cngx/forms/select); the select-side token's default factory delegates to this one, so a single override here cascades into every select variant transparently.

bootstrapApplication(App, {
  providers: [
    {
      provide: CNGX_COMMIT_CONTROLLER_FACTORY,
      useValue: <T>() => createRetryingCommitController<T>({ attempts: 3 }),
    },
  ],
});

Type#

InjectionToken<CngxCommitControllerFactory>

Provided in#

'root'