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" ;
22import { BookModel } from "src/app/shared/models/book.model" ;
33import { BooksPageActions } from "src/app/books/actions" ;
44
@@ -35,3 +35,7 @@ export const booksReducer = createReducer(
3535 } ;
3636 } )
3737) ;
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 11import { ActionReducerMap , createSelector , MetaReducer } from "@ngrx/store" ;
2+ import * as fromBooks from "./books.reducer" ;
23
3- export interface State { }
4+ export interface State {
5+ books : fromBooks . State ;
6+ }
47
5- export const reducers : ActionReducerMap < State > = { } ;
8+ export const reducers : ActionReducerMap < State > = {
9+ books : fromBooks . reducer
10+ } ;
611
712export const metaReducers : MetaReducer < State > [ ] = [ ] ;
813
You can’t perform that action at this time.
0 commit comments