File tree 2 files changed +7
-7
lines changed
examples/counter/components
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ class CounterController {
51
51
/* ngRedux will merge the requested state's slice and actions onto this,
52
52
you don't need to redefine them in your controller */
53
53
54
- let unsubscribe = $ngRedux .connect (this .mapStateToTarget , CounterActions)(this );
54
+ let unsubscribe = $ngRedux .connect (this .mapStateTothis , CounterActions)(this );
55
55
$scope .$on (' $destroy' , unsubscribe);
56
56
}
57
57
58
- // Which part of the Redux global state does our component want to receive on $scope ?
59
- mapStateToTarget (state ) {
58
+ // Which part of the Redux global state does our component want to receive?
59
+ mapStateToThis (state ) {
60
60
return {
61
- counter : state .counter
61
+ value : state .counter
62
62
};
63
63
}
64
64
}
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ export default function counter() {
13
13
class CounterController {
14
14
15
15
constructor ( $ngRedux , $scope ) {
16
- const unsubscribe = $ngRedux . connect ( this . mapStateToScope , CounterActions ) ( this ) ;
16
+ const unsubscribe = $ngRedux . connect ( this . mapStateToThis , CounterActions ) ( this ) ;
17
17
$scope . $on ( '$destroy' , unsubscribe ) ;
18
18
}
19
19
20
- // Which part of the Redux global state does our component want to receive on $scope ?
21
- mapStateToScope ( state ) {
20
+ // Which part of the Redux global state does our component want to receive?
21
+ mapStateToThis ( state ) {
22
22
return {
23
23
value : state . counter
24
24
} ;
You can’t perform that action at this time.
0 commit comments