File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
examples/counter/components Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ class CounterController {
5151 /* ngRedux will merge the requested state's slice and actions onto this,
5252 you don't need to redefine them in your controller */
5353
54- let unsubscribe = $ngRedux .connect (this .mapStateToTarget , CounterActions)(this );
54+ let unsubscribe = $ngRedux .connect (this .mapStateTothis , CounterActions)(this );
5555 $scope .$on (' $destroy' , unsubscribe);
5656 }
5757
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 ) {
6060 return {
61- counter : state .counter
61+ value : state .counter
6262 };
6363 }
6464}
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ export default function counter() {
1313class CounterController {
1414
1515 constructor ( $ngRedux , $scope ) {
16- const unsubscribe = $ngRedux . connect ( this . mapStateToScope , CounterActions ) ( this ) ;
16+ const unsubscribe = $ngRedux . connect ( this . mapStateToThis , CounterActions ) ( this ) ;
1717 $scope . $on ( '$destroy' , unsubscribe ) ;
1818 }
1919
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 ) {
2222 return {
2323 value : state . counter
2424 } ;
You can’t perform that action at this time.
0 commit comments