Skip to content

AIDK API Reference / aidk-angular / provideEngine

Function: provideEngine() ​

ts
function provideEngine(config: EngineClientConfig): (
  | typeof ExecutionService
  | typeof ChannelsService
  | {
  deps?: undefined;
  provide: InjectionToken<EngineClientConfig>;
  useFactory?: undefined;
  useValue: EngineClientConfig;
}
  | {
  deps: (typeof NgZone | Optional[])[];
  provide: typeof EngineService;
  useFactory: (ngZone: NgZone, config: EngineClientConfig) => EngineService;
  useValue?: undefined;
})[];

Defined in: packages/angular/src/engine.module.ts:82

Standalone provider function for Engine services. Use this with bootstrapApplication.

Parameters ​

ParameterType
configEngineClientConfig

Returns ​

( | typeof ExecutionService | typeof ChannelsService | { deps?: undefined; provide: InjectionToken<EngineClientConfig>; useFactory?: undefined; useValue: EngineClientConfig; } | { deps: (typeof NgZone | Optional[])[]; provide: typeof EngineService; useFactory: (ngZone: NgZone, config: EngineClientConfig) => EngineService; useValue?: undefined; })[]

Example ​

typescript
bootstrapApplication(AppComponent, {
  providers: [
    provideEngine({ baseUrl: 'http://localhost:3000' }),
  ],
});

Released under the MIT License.