@@ -55,10 +55,10 @@ import { AppComponent } from './app.component';
5555 BrowserModule ,
5656 FormsModule ,
5757 HttpModule ,
58- NgReduxModule // <- New
58+ NgReduxModule , // <- New
5959 ],
6060 providers: [],
61- bootstrap: [AppComponent ]
61+ bootstrap: [AppComponent ],
6262})
6363export class AppModule {}
6464```
@@ -89,7 +89,7 @@ import { Component } from '@angular/core';
8989@Component ({
9090 selector: ' app-root' ,
9191 templateUrl: ' ./app.component.html' ,
92- styleUrls: [' ./app.component.css' ]
92+ styleUrls: [' ./app.component.css' ],
9393})
9494export class AppComponent {
9595 title = ' app works!' ;
@@ -151,7 +151,7 @@ const nextValueOfCount = streamOfActions.reduce(
151151
152152 return state;
153153 },
154- { count: 0 }
154+ { count: 0 },
155155);
156156```
157157
@@ -192,7 +192,7 @@ export interface IAppState {
192192}
193193
194194export const INITIAL_STATE: IAppState = {
195- count: 0
195+ count: 0 ,
196196};
197197
198198export function rootReducer(lastState : IAppState , action : Action ): IAppState {
@@ -230,7 +230,7 @@ import { CounterActions } from './app.actions'; // <- New
230230 declarations: [AppComponent ],
231231 imports: [BrowserModule , FormsModule , HttpModule , NgReduxModule ],
232232 providers: [CounterActions ], // <- New
233- bootstrap: [AppComponent ]
233+ bootstrap: [AppComponent ],
234234})
235235export class AppModule {
236236 constructor (ngRedux : NgRedux <IAppState >) {
@@ -273,7 +273,7 @@ ends up looking conceptually a bit like this:
273273// Pseudocode
274274const finalAppState: IAppState = actionsOverTime .reduce (
275275 rootReducer ,
276- INITIAL_STATE
276+ INITIAL_STATE ,
277277);
278278```
279279
@@ -306,7 +306,7 @@ import { IAppState } from '../store'; // <- New
306306@Component ({
307307 selector: ' app-root' ,
308308 templateUrl: ' ./app.component.html' ,
309- styleUrls: [' ./app.component.css' ]
309+ styleUrls: [' ./app.component.css' ],
310310})
311311export class AppComponent {
312312 title = ' app works!' ;
@@ -315,7 +315,7 @@ export class AppComponent {
315315 constructor (
316316 // <- New
317317 private ngRedux : NgRedux <IAppState >, // <- New
318- private actions : CounterActions
318+ private actions : CounterActions ,
319319 ) {} // <- New
320320
321321 increment() {
@@ -350,7 +350,7 @@ export class AppComponent implements OnDestroy {
350350
351351 constructor (
352352 private ngRedux : NgRedux <IAppState >,
353- private actions : CounterActions
353+ private actions : CounterActions ,
354354 ) {
355355 this .subscription = ngRedux
356356 .select <number >(' count' ) // <- New
@@ -447,15 +447,15 @@ import { Observable } from 'rxjs/Observable';
447447@Component ({
448448 selector: ' app-root' ,
449449 templateUrl: ' ./app.component.html' ,
450- styleUrls: [' ./app.component.css' ]
450+ styleUrls: [' ./app.component.css' ],
451451})
452452export class AppComponent {
453453 title = ' app works!' ;
454454 @select () readonly count$: Observable <number >; // <- Changed
455455
456456 constructor (
457457 private actions : CounterActions ,
458- private ngRedux : NgRedux <IAppState >
458+ private ngRedux : NgRedux <IAppState >,
459459 ) {} // <- Changed
460460
461461 increment() {
@@ -590,7 +590,7 @@ Then, make a quick adjustment to enable them in your app:
590590import {
591591 NgReduxModule ,
592592 NgRedux ,
593- DevToolsExtension
593+ DevToolsExtension ,
594594} from ' @angular-redux/store' ; // <- Changed
595595
596596@NgModule ({
@@ -608,7 +608,7 @@ export class AppModule {
608608 rootReducer ,
609609 INITIAL_STATE ,
610610 [], // <- New
611- storeEnhancers
611+ storeEnhancers ,
612612 ); // <- New
613613 }
614614}
0 commit comments