1
0

added tests for hostReducer and Header Effects, and switch to typed actions

This commit is contained in:
Art Lowel
2017-01-13 11:25:07 +01:00
parent dba6dcec63
commit 8e4bec9c30
13 changed files with 211 additions and 82 deletions

View File

@@ -8,7 +8,7 @@ import {
import { TranslateService } from "ng2-translate";
import { HostWindowState } from "./shared/host-window.reducer";
import { Store } from "@ngrx/store";
import { HostWindowActions } from "./shared/host-window.actions";
import { HostWindowResizeAction } from "./shared/host-window.actions";
@Component({
changeDetection: ChangeDetectionStrategy.Default,
@@ -52,7 +52,7 @@ export class AppComponent implements OnDestroy, OnInit {
@HostListener('window:resize', ['$event'])
private onResize(event): void {
this.store.dispatch(
HostWindowActions.resize(event.target.innerWidth, event.target.innerHeight)
new HostWindowResizeAction(event.target.innerWidth, event.target.innerHeight)
);
}