--- /dev/null
+import { ActionReducer } from '@ngrx/store';
+
+// console.log all actions
+export function debug(reducer: ActionReducer<any>): ActionReducer<any> {
+ return function(state, action) {
+ console.log('state', state);
+ console.log('action', action);
+
+ return reducer(state, action);
+ };
+}
} from '@ngrx/store';
import { environment } from '../../environments/environment';
import * as fromVorgang from './vorgang';
+import { debug } from './debug';
export interface State {
};
-export const metaReducers: MetaReducer<State>[] = !environment.production ? [] : [];
+export const metaReducers: MetaReducer<State>[] = !environment.production ? [ debug ] : [];