mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
Merge pull request #76 from AlDrag/fix-ngrx-notification
fix(ngrx-notification): compilation error
This commit is contained in:
@@ -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),
|
||||||
|
|||||||
@@ -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)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user