@@ -55,10 +55,10 @@ import { AppComponent } from './app.component';
55
55
BrowserModule ,
56
56
FormsModule ,
57
57
HttpModule ,
58
- NgReduxModule // <- New
58
+ NgReduxModule , // <- New
59
59
],
60
60
providers: [],
61
- bootstrap: [AppComponent ]
61
+ bootstrap: [AppComponent ],
62
62
})
63
63
export class AppModule {}
64
64
```
@@ -89,7 +89,7 @@ import { Component } from '@angular/core';
89
89
@Component ({
90
90
selector: ' app-root' ,
91
91
templateUrl: ' ./app.component.html' ,
92
- styleUrls: [' ./app.component.css' ]
92
+ styleUrls: [' ./app.component.css' ],
93
93
})
94
94
export class AppComponent {
95
95
title = ' app works!' ;
@@ -151,7 +151,7 @@ const nextValueOfCount = streamOfActions.reduce(
151
151
152
152
return state;
153
153
},
154
- { count: 0 }
154
+ { count: 0 },
155
155
);
156
156
```
157
157
@@ -192,7 +192,7 @@ export interface IAppState {
192
192
}
193
193
194
194
export const INITIAL_STATE: IAppState = {
195
- count: 0
195
+ count: 0 ,
196
196
};
197
197
198
198
export function rootReducer(lastState : IAppState , action : Action ): IAppState {
@@ -230,7 +230,7 @@ import { CounterActions } from './app.actions'; // <- New
230
230
declarations: [AppComponent ],
231
231
imports: [BrowserModule , FormsModule , HttpModule , NgReduxModule ],
232
232
providers: [CounterActions ], // <- New
233
- bootstrap: [AppComponent ]
233
+ bootstrap: [AppComponent ],
234
234
})
235
235
export class AppModule {
236
236
constructor (ngRedux : NgRedux <IAppState >) {
@@ -273,7 +273,7 @@ ends up looking conceptually a bit like this:
273
273
// Pseudocode
274
274
const finalAppState: IAppState = actionsOverTime .reduce (
275
275
rootReducer ,
276
- INITIAL_STATE
276
+ INITIAL_STATE ,
277
277
);
278
278
```
279
279
@@ -306,7 +306,7 @@ import { IAppState } from '../store'; // <- New
306
306
@Component ({
307
307
selector: ' app-root' ,
308
308
templateUrl: ' ./app.component.html' ,
309
- styleUrls: [' ./app.component.css' ]
309
+ styleUrls: [' ./app.component.css' ],
310
310
})
311
311
export class AppComponent {
312
312
title = ' app works!' ;
@@ -315,7 +315,7 @@ export class AppComponent {
315
315
constructor (
316
316
// <- New
317
317
private ngRedux : NgRedux <IAppState >, // <- New
318
- private actions : CounterActions
318
+ private actions : CounterActions ,
319
319
) {} // <- New
320
320
321
321
increment() {
@@ -350,7 +350,7 @@ export class AppComponent implements OnDestroy {
350
350
351
351
constructor (
352
352
private ngRedux : NgRedux <IAppState >,
353
- private actions : CounterActions
353
+ private actions : CounterActions ,
354
354
) {
355
355
this .subscription = ngRedux
356
356
.select <number >(' count' ) // <- New
@@ -447,15 +447,15 @@ import { Observable } from 'rxjs/Observable';
447
447
@Component ({
448
448
selector: ' app-root' ,
449
449
templateUrl: ' ./app.component.html' ,
450
- styleUrls: [' ./app.component.css' ]
450
+ styleUrls: [' ./app.component.css' ],
451
451
})
452
452
export class AppComponent {
453
453
title = ' app works!' ;
454
454
@select () readonly count$: Observable <number >; // <- Changed
455
455
456
456
constructor (
457
457
private actions : CounterActions ,
458
- private ngRedux : NgRedux <IAppState >
458
+ private ngRedux : NgRedux <IAppState >,
459
459
) {} // <- Changed
460
460
461
461
increment() {
@@ -590,7 +590,7 @@ Then, make a quick adjustment to enable them in your app:
590
590
import {
591
591
NgReduxModule ,
592
592
NgRedux ,
593
- DevToolsExtension
593
+ DevToolsExtension ,
594
594
} from ' @angular-redux/store' ; // <- Changed
595
595
596
596
@NgModule ({
@@ -608,7 +608,7 @@ export class AppModule {
608
608
rootReducer ,
609
609
INITIAL_STATE ,
610
610
[], // <- New
611
- storeEnhancers
611
+ storeEnhancers ,
612
612
); // <- New
613
613
}
614
614
}
0 commit comments