mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 06:13:03 -05:00
Due to a recent refactor of upgrading to Angular v16, the reducers weren't copied over to the new `app.config.ts` file for the `ngrx-1` module. Also fixed a minor spelling mistake in the related README.md file.
28 lines
881 B
TypeScript
28 lines
881 B
TypeScript
import { ApplicationConfig } from '@angular/core';
|
|
import { provideStore } from '@ngrx/store';
|
|
import { provideEffects } from '@ngrx/effects';
|
|
import { ActivityEffects } from './store/activity/activity.effects';
|
|
import { UserEffects } from './store/user/user.effects';
|
|
import { StatusEffects } from './store/status/status.effects';
|
|
import {
|
|
activityFeatureKey,
|
|
activityReducer,
|
|
} from './store/activity/activity.reducer';
|
|
|
|
import { statusFeatureKey, statusReducer } from './store/status/status.reducer';
|
|
|
|
import { userFeatureKey, userReducer } from './store/user/user.reducer';
|
|
|
|
const reducers = {
|
|
[statusFeatureKey]: statusReducer,
|
|
[activityFeatureKey]: activityReducer,
|
|
[userFeatureKey]: userReducer,
|
|
};
|
|
|
|
export const appConfig: ApplicationConfig = {
|
|
providers: [
|
|
provideStore(reducers),
|
|
provideEffects([ActivityEffects, UserEffects, StatusEffects]),
|
|
],
|
|
};
|