1
0

44988: added reducer, angular animation, tests...

This commit is contained in:
Lotte Hofstede
2017-10-30 17:04:52 +01:00
parent bbe15e8e67
commit 7d5dad94a1
16 changed files with 334 additions and 80 deletions

View File

@@ -62,12 +62,17 @@ export class AppComponent implements OnInit {
const env: string = this.config.production ? 'Production' : 'Development';
const color: string = this.config.production ? 'red' : 'green';
console.info(`Environment: %c${env}`, `color: ${color}; font-weight: bold;`);
this.dispatchWindowSize(this._window.nativeWindow.innerWidth, this._window.nativeWindow.innerHeight);
}
@HostListener('window:resize', ['$event'])
private onResize(event): void {
this.dispatchWindowSize(event.target.innerWidth, event.target.innerHeight);
}
private dispatchWindowSize(width, height): void {
this.store.dispatch(
new HostWindowResizeAction(event.target.innerWidth, event.target.innerHeight)
new HostWindowResizeAction(width, height)
);
}