chore(version): update to version 16

This commit is contained in:
thomas
2023-05-22 22:06:48 +02:00
parent e2680b3911
commit 2d5dab5211
126 changed files with 3782 additions and 7197 deletions

View File

@@ -5,7 +5,7 @@
{
"files": ["*.ts"],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
@@ -29,7 +29,7 @@
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]

View File

@@ -75,7 +75,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/ngrx-notification/**/*.ts",

View File

@@ -0,0 +1,33 @@
import { ApplicationConfig } from '@angular/core';
import { provideStore } from '@ngrx/store';
import { provideEffects } from '@ngrx/effects';
import { TeacherEffects } from './teacher/store/teacher.effects';
import { StudentEffects } from './student/store/student.effects';
import { provideRouter } from '@angular/router';
import { ROUTES } from './routes';
import { APP_INITIALIZER, enableProdMode, inject } from '@angular/core';
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend';
import { NotificationService } from './data-access/notification.service';
export const appConfig: ApplicationConfig = {
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();
},
},
],
};

View File

@@ -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)
);