Skip to content

Commit df25941

Browse files
Evan Schultzsmithad15
Evan Schultz
authored andcommitted
Merge pull request angular-redux#133 from angular-redux/fix-example-for-ng3
fix(example): Fix example to work with v3
1 parent e466af2 commit df25941

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

packages/store/examples/counter/components/CounterInfo.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { select } from 'ng2-redux';
44
import 'rxjs/add/operator/combineLatest';
55

66
@Component({
7-
selector: 'counter-info',
8-
template: `
7+
selector: 'counter-info',
8+
template: `
99
<ul>
1010
<li>{{ funcCounter$ | async }}</li>
1111
<li>{{ stringKey$ | async }}</li>
@@ -22,10 +22,11 @@ export class CounterInfo {
2222
foo: any;
2323

2424
ngOnInit() {
25-
this.counterX2$.combineLatest(this.stringKey$, (x, y) => {
26-
return { x: x * 2, y: y * 3 };
27-
}).subscribe(n => {
28-
this.foo = n;
29-
})
25+
this.counterX2$.combineLatest(this.stringKey$,
26+
(x: number, y: number) => {
27+
return { x: x * 2, y: y * 3 };
28+
}).subscribe(n => {
29+
this.foo = n;
30+
});
3031
}
3132
}

packages/store/examples/counter/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
},
2525
"homepage": "https://github.com/wbuchwalter/ng2-redux#readme",
2626
"dependencies": {
27-
"@angular/common": "^2.0.0-rc.1",
28-
"@angular/compiler": "^2.0.0-rc.1",
29-
"@angular/core": "2.0.0-rc.1",
30-
"@angular/http": "^2.0.0-rc.1",
31-
"@angular/platform-browser": "^2.0.0-rc.1",
32-
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
27+
"@angular/common": "2.0.0-rc.2",
28+
"@angular/compiler": "2.0.0-rc.2",
29+
"@angular/core": "2.0.0-rc.2",
30+
"@angular/http": "2.0.0-rc.2",
31+
"@angular/platform-browser": "2.0.0-rc.2",
32+
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
3333
"core-js": "^2.3.0",
34-
"ng2-redux": "^2.3.1",
34+
"ng2-redux": "^3.0.0",
3535
"redux": "^3.4.0",
3636
"redux-logger": "^2.6.1",
3737
"redux-localstorage": "^0.4.0",

packages/store/examples/counter/reducers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as Redux from 'redux';
22
const { combineReducers } = Redux;
3-
import { RootState } from '../store/configureStore';
3+
import { RootState } from '../store';
44
import counter from './counter';
55

66
const rootReducer = combineReducers<RootState>({

0 commit comments

Comments
 (0)