You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A reducer object as reducer argument for the `createStoreWith`:
62
+
63
+
```JS
64
+
importreducersfrom'./reducers';
65
+
import { combineReducers } from'redux';
66
+
importloggingMiddlewarefrom'./loggingMiddleware';
67
+
importngReduxfrom'ng-redux';
68
+
69
+
angular.module('app', [ngRedux])
70
+
.config(($ngReduxProvider) => {
71
+
reducer3 =functtion(state, action){}
72
+
$ngReduxProvider.createStoreWith({
73
+
reducer1:"reducer1",
74
+
reducer2:function(state, action){},
75
+
reducer3: reducer3
76
+
}, ['promiseMiddleware', loggingMiddleware]);
77
+
});
78
+
```
79
+
80
+
The object can be constructed either by passing a function as value or a string representing the reducer. This way, you can create reducers as services and initialze them inside the `.config`. Behind the secnes, ngRedux will `$injector.get` the string you pass as the value for the ojects of reducers and initilaze it.
0 commit comments