File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
- import { createReducer , on } from "@ngrx/store" ;
1
+ import { createReducer , on , Action } from "@ngrx/store" ;
2
2
import { BookModel } from "src/app/shared/models/book.model" ;
3
3
import { BooksPageActions } from "src/app/books/actions" ;
4
4
@@ -35,3 +35,7 @@ export const booksReducer = createReducer(
35
35
} ;
36
36
} )
37
37
) ;
38
+
39
+ export function reducer ( state : State | undefined , action : Action ) {
40
+ return booksReducer ( state , action ) ;
41
+ }
Original file line number Diff line number Diff line change 1
1
import { ActionReducerMap , createSelector , MetaReducer } from "@ngrx/store" ;
2
+ import * as fromBooks from "./books.reducer" ;
2
3
3
- export interface State { }
4
+ export interface State {
5
+ books : fromBooks . State ;
6
+ }
4
7
5
- export const reducers : ActionReducerMap < State > = { } ;
8
+ export const reducers : ActionReducerMap < State > = {
9
+ books : fromBooks . reducer
10
+ } ;
6
11
7
12
export const metaReducers : MetaReducer < State > [ ] = [ ] ;
8
13
You can’t perform that action at this time.
0 commit comments