GitHub

provideDaffInMemoryDriver

Provider

import { provideDaffInMemoryDriver } from '@daffodil/driver/in-memory'

Configures the Angular in-memory web API with Daffodil backend services.

Parameters

Parameterconfig: DaffInMemoryDriverConfig
DefaultDAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT
Description
Parameterbackends: Type<DaffInMemoryBackendInterface>[]
Description

Examples

bootstrapApplication(AppComponent, {
  providers: [
    provideDaffInMemoryDriver(
      { delay: 300 },
      DaffProductInMemoryBackendService,
      DaffCartInMemoryBackendService
    )
  ]
});

bootstrapApplication(AppComponent, {
  providers: [
    provideDaffInMemoryDriver(
      { delay: 300 },
      DaffProductInMemoryBackendService,
      DaffCartInMemoryBackendService
    )
  ]
});