Skip to content

Commit da17096

Browse files
author
Your Name
committed
NgRx - The Complete Guide
1 parent b55b023 commit da17096

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/app/auth/auth.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {MatButtonModule} from "@angular/material/button";
99
import { StoreModule } from '@ngrx/store';
1010
import {AuthService} from "./auth.service";
1111
import { EffectsModule } from '@ngrx/effects';
12+
import * as fromAuth from './reducers';
1213

1314
@NgModule({
1415
imports: [
@@ -18,7 +19,10 @@ import { EffectsModule } from '@ngrx/effects';
1819
MatInputModule,
1920
MatButtonModule,
2021
RouterModule.forChild([{path: '', component: LoginComponent}]),
21-
22+
StoreModule.forFeature(
23+
'auth',
24+
fromAuth.reducers
25+
)
2226
],
2327
declarations: [LoginComponent],
2428
exports: [LoginComponent]

src/app/auth/reducers/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import {
2+
ActionReducer,
3+
ActionReducerMap,
4+
createFeatureSelector,
5+
createSelector,
6+
MetaReducer
7+
} from '@ngrx/store';
8+
9+
10+
11+
export interface State {
12+
13+
}
14+
15+
export const reducers: ActionReducerMap<State> = {
16+
17+
};
18+

0 commit comments

Comments
 (0)