Merge pull request #76 from AlDrag/fix-ngrx-notification

fix(ngrx-notification): compilation error
This commit is contained in:
Laforge Thomas
2023-07-10 09:33:38 +02:00
committed by GitHub
2 changed files with 16 additions and 16 deletions

View File

@@ -5,9 +5,23 @@ import { TeacherEffects } from './teacher/store/teacher.effects';
import { StudentEffects } from './student/store/student.effects'; import { StudentEffects } from './student/store/student.effects';
import { provideRouter } from '@angular/router'; import { provideRouter } from '@angular/router';
import { ROUTES } from './routes'; import { ROUTES } from './routes';
import { APP_INITIALIZER, enableProdMode, inject } from '@angular/core'; import { APP_INITIALIZER, inject } from '@angular/core';
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend'; import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend';
import { NotificationService } from './data-access/notification.service'; import { NotificationService } from './data-access/notification.service';
import {
teacherReducer,
teachersFeatureKey,
} from './teacher/store/teacher.reducer';
import {
studentReducer,
studentsFeatureKey,
} from './student/store/student.reducer';
const REDUCERS = {
[teachersFeatureKey]: teacherReducer,
[studentsFeatureKey]: studentReducer,
};
export const appConfig: ApplicationConfig = { export const appConfig: ApplicationConfig = {
providers: [ providers: [
provideStore(REDUCERS), provideStore(REDUCERS),

View File

@@ -1,29 +1,15 @@
import { appConfig } from './app/app.config'; import { appConfig } from './app/app.config';
import { bootstrapApplication } from '@angular/platform-browser'; import { bootstrapApplication } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppComponent } from './app/app.component'; import { AppComponent } from './app/app.component';
import {
studentReducer,
studentsFeatureKey,
} from './app/student/store/student.reducer';
import {
teacherReducer,
teachersFeatureKey,
} from './app/teacher/store/teacher.reducer';
import { environment } from './environments/environment'; import { environment } from './environments/environment';
if (environment.production) { if (environment.production) {
enableProdMode(); enableProdMode();
} }
const REDUCERS = {
[teachersFeatureKey]: teacherReducer,
[studentsFeatureKey]: studentReducer,
};
bootstrapApplication(AppComponent, appConfig).catch((err) => bootstrapApplication(AppComponent, appConfig).catch((err) =>
console.error(err) console.error(err)
); );