rewrote header reaction to route change as ngrx event

This commit is contained in:
Art Lowel
2016-12-12 16:42:03 +01:00
parent 20632a8d12
commit 54f3cbc41b
4 changed files with 15 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
import { StoreModule } from "@ngrx/store";
import { RouterStoreModule } from "@ngrx/router-store";
import { StoreDevtoolsModule } from "@ngrx/store-devtools";
import reducers from './app.reducers';
@@ -31,6 +32,12 @@ import effects from './app.effects';
*/
StoreModule.provideStore(reducers),
/**
* @ngrx/router-store keeps router state up-to-date in the store and uses
* the store as the single source of truth for the router's state.
*/
RouterStoreModule.connectRouter(),
/**
* Store devtools instrument the store retaining past versions of state
* and recalculating new states. This enables powerful time-travel