GitHub

provideDaffInMemoryDriver

const

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

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

const provideDaffInMemoryDriver: (config?: DaffInMemoryDriverConfig, ...backends: Type<DaffInMemoryBackendInterface>[]) => EnvironmentProviders[]

Examples

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

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