File tree 2 files changed +30
-0
lines changed
libs/driver/in-memory/src
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ import {
2
+ NgModule ,
3
+ ModuleWithProviders ,
4
+ importProvidersFrom ,
5
+ } from '@angular/core' ;
6
+ import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api' ;
7
+
8
+ import { DaffInMemoryRootBackend } from './backend/public_api' ;
9
+ import {
10
+ DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT ,
11
+ DaffInMemoryDriverConfig ,
12
+ provideDaffInMemoryDriverConfig ,
13
+ } from './config/public_api' ;
14
+
15
+ /**
16
+ * Sets up the angular in memory web API with the {@link DaffInMemoryRootBackend}.
17
+ */
18
+ @NgModule ( )
19
+ export class DaffInMemoryDriverModule {
20
+ static forRoot ( config : DaffInMemoryDriverConfig = DAFF_IN_MEMORY_DRIVER_CONFIG_DEFAULT ) : ModuleWithProviders < DaffInMemoryDriverModule > {
21
+ return {
22
+ ngModule : DaffInMemoryDriverModule ,
23
+ providers : [
24
+ importProvidersFrom ( HttpClientInMemoryWebApiModule . forRoot ( DaffInMemoryRootBackend , config ) ) ,
25
+ provideDaffInMemoryDriverConfig ( config ) ,
26
+ ] ,
27
+ } ;
28
+ }
29
+ }
Original file line number Diff line number Diff line change 1
1
export * from './backend/public_api' ;
2
2
export * from './driver/public_api' ;
3
3
export * from './config/public_api' ;
4
+ export * from './module' ;
You can’t perform that action at this time.
0 commit comments