More refactoring + reusing the server's store on the client

This commit is contained in:
Art Lowel
2017-03-02 13:36:40 +01:00
parent b0f25c4dae
commit 7745938027
27 changed files with 348 additions and 371 deletions

View File

@@ -10,13 +10,6 @@ import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
import { StoreModule } from "@ngrx/store";
import { RouterStoreModule } from "@ngrx/router-store";
import { StoreDevtoolsModule } from "@ngrx/store-devtools";
import { rootReducer } from './app.reducers';
import { effects } from './app.effects';
@NgModule({
declarations: [
AppComponent,
@@ -28,34 +21,6 @@ import { effects } from './app.effects';
HomeModule,
CoreModule.forRoot(),
AppRoutingModule,
/**
* StoreModule.provideStore is imported once in the root module, accepting a reducer
* function or object map of reducer functions. If passed an object of
* reducers, combineReducers will be run creating your application
* meta-reducer. This returns all providers for an @ngrx/store
* based application.
*/
StoreModule.provideStore(rootReducer),
/**
* @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
* debugging.
*
* To use the debugger, install the Redux Devtools extension for either
* Chrome or Firefox
*
* See: https://github.com/zalmoxisus/redux-devtools-extension
*/
StoreDevtoolsModule.instrumentOnlyWithExtension(),
effects
],
providers: [
]