forked from angular-redux/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule.ts
29 lines (26 loc) · 812 Bytes
/
module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { NgRedux } from '@angular-redux/store';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgReduxFormConnectArrayModule } from './connect-array/connect-array.module';
import { NgReduxFormConnectModule } from './connect/connect.module';
import { FormStore } from './form-store';
export function formStoreFactory(ngRedux: NgRedux<any>) {
return new FormStore(ngRedux);
}
@NgModule({
imports: [
FormsModule,
ReactiveFormsModule,
NgReduxFormConnectModule,
NgReduxFormConnectArrayModule,
],
exports: [NgReduxFormConnectModule, NgReduxFormConnectArrayModule],
providers: [
{
provide: FormStore,
useFactory: formStoreFactory,
deps: [NgRedux],
},
],
})
export class NgReduxFormModule {}