mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 03:53:02 +00:00
reimplemented header navbar toggle using redux
This commit is contained in:
@@ -7,6 +7,12 @@ import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { HeaderComponent } from './header/header.component';
|
||||
|
||||
import { StoreModule } from "@ngrx/store";
|
||||
import { StoreDevtoolsModule } from "@ngrx/store-devtools";
|
||||
|
||||
import reducers from './app.reducers'
|
||||
import actions from './app.actions'
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@@ -16,7 +22,29 @@ import { HeaderComponent } from './header/header.component';
|
||||
imports: [
|
||||
SharedModule,
|
||||
HomeModule,
|
||||
AppRoutingModule
|
||||
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(reducers),
|
||||
/**
|
||||
* 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(),
|
||||
],
|
||||
providers: [
|
||||
actions
|
||||
]
|
||||
})
|
||||
export class AppModule {
|
||||
|
Reference in New Issue
Block a user