mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 06:13:03 -05:00
chore(version): update to version 16
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend';
|
||||
import { APP_INITIALIZER, enableProdMode, inject } from '@angular/core';
|
||||
import { appConfig } from './app/app.config';
|
||||
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { provideRouter } from '@angular/router';
|
||||
import { provideEffects } from '@ngrx/effects';
|
||||
import { provideStore } from '@ngrx/store';
|
||||
|
||||
import { AppComponent } from './app/app.component';
|
||||
import { NotificationService } from './app/data-access/notification.service';
|
||||
import { ROUTES } from './app/routes';
|
||||
import { StudentEffects } from './app/student/store/student.effects';
|
||||
|
||||
import {
|
||||
studentReducer,
|
||||
studentsFeatureKey,
|
||||
} from './app/student/store/student.reducer';
|
||||
import { TeacherEffects } from './app/teacher/store/teacher.effects';
|
||||
|
||||
import {
|
||||
teacherReducer,
|
||||
teachersFeatureKey,
|
||||
@@ -28,26 +24,6 @@ const REDUCERS = {
|
||||
[studentsFeatureKey]: studentReducer,
|
||||
};
|
||||
|
||||
bootstrapApplication(AppComponent, {
|
||||
providers: [
|
||||
provideStore(REDUCERS),
|
||||
provideEffects([TeacherEffects, StudentEffects]),
|
||||
provideRouter(ROUTES),
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
multi: true,
|
||||
useFactory: () => {
|
||||
const service = inject(FakeBackendService);
|
||||
return () => service.start();
|
||||
},
|
||||
},
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
multi: true,
|
||||
useFactory: () => {
|
||||
const service = inject(NotificationService);
|
||||
return () => service.init();
|
||||
},
|
||||
},
|
||||
],
|
||||
}).catch((err) => console.error(err));
|
||||
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||
console.error(err)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user