mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 11:33:04 +00:00
More refactoring + reusing the server's store on the client
This commit is contained in:
@@ -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: [
|
||||
]
|
||||
|
Reference in New Issue
Block a user