[angular-18 | WIP] upgrade angular core and cli to v18

This commit is contained in:
Alex Martzios 2024-07-25 10:59:24 +03:00
parent c22d7fd876
commit dca0985380
3 changed files with 49 additions and 56 deletions

View File

@ -21,19 +21,19 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^17.3.12", "@angular/animations": "^18.1.2",
"@angular/cdk": "^17.3.10", "@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.12", "@angular/common": "^18.1.2",
"@angular/compiler": "^17.3.12", "@angular/compiler": "^18.1.2",
"@angular/core": "^17.3.12", "@angular/core": "^18.1.2",
"@angular/forms": "^17.3.12", "@angular/forms": "^18.1.2",
"@angular/localize": "^17.3.12", "@angular/localize": "^18.1.2",
"@angular/material": "^17.3.10", "@angular/material": "^17.3.10",
"@angular/platform-browser": "^17.3.12", "@angular/platform-browser": "^18.1.2",
"@angular/platform-browser-dynamic": "^17.3.12", "@angular/platform-browser-dynamic": "^18.1.2",
"@angular/platform-server": "^17.3.12", "@angular/platform-server": "^18.1.2",
"@angular/router": "^17.3.12", "@angular/router": "^18.1.2",
"@angular/ssr": "^17.3.8", "@angular/ssr": "^18.1.2",
"clipboard": "^1.5.16", "clipboard": "^1.5.16",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"express": "^4.15.2", "express": "^4.15.2",
@ -46,10 +46,10 @@
"zone.js": "~0.14.0" "zone.js": "~0.14.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^17.3.8", "@angular-devkit/build-angular": "^18.1.2",
"@angular/cli": "^17.3.8", "@angular/cli": "^18.1.2",
"@angular/compiler-cli": "^17.3.12", "@angular/compiler-cli": "^18.1.2",
"@angular/language-service": "^17.3.12", "@angular/language-service": "^18.1.2",
"@types/compression": "^1.7.0", "@types/compression": "^1.7.0",
"@types/express": "^4.17.0", "@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",

View File

@ -1,7 +1,7 @@
import {APP_ID, NgModule} from '@angular/core'; import {APP_ID, NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms'; import {FormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http"; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
import {BrowserModule} from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {AppComponent} from './app.component'; import {AppComponent} from './app.component';
@ -22,45 +22,38 @@ import {AlertModalModule} from "./openaireLibrary/utils/modal/alertModal.module"
import {isDevelopmentGuard} from './openaireLibrary/error/isDevelopmentGuard.guard'; import {isDevelopmentGuard} from './openaireLibrary/error/isDevelopmentGuard.guard';
import {HelperModule} from "./openaireLibrary/utils/helper/helper.module"; import {HelperModule} from "./openaireLibrary/utils/helper/helper.module";
@NgModule({ @NgModule({ declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent],
imports: [ bootstrap: [AppComponent], imports: [SharedModule,
SharedModule, BrowserAnimationsModule,
BrowserAnimationsModule, CommonModule,
CommonModule, ErrorModule,
HttpClientModule, FormsModule,
ErrorModule, NavigationBarModule,
FormsModule, QuickContactModule,
NavigationBarModule, BottomModule,
QuickContactModule, CookieLawModule,
BottomModule, BrowserModule,
CookieLawModule, AppRoutingModule,
BrowserModule, Schema2jsonldModule,
AppRoutingModule, AlertModalModule,
Schema2jsonldModule, HelperModule], providers: [
AlertModalModule, isDevelopmentGuard,
HelperModule { provide: APP_ID, useValue: 'monitor' },
], {
declarations: [AppComponent, OpenaireErrorPageComponent], provide: HTTP_INTERCEPTORS,
exports: [AppComponent], useClass: HttpInterceptorService,
providers: [ multi: true
isDevelopmentGuard, },
{provide: APP_ID, useValue: 'monitor'}, {
{ provide: HTTP_INTERCEPTORS,
provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptorService,
useClass: HttpInterceptorService, multi: true
multi: true },
}, [{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
{ [{ provide: DEFAULT_TIMEOUT, useValue: 30000 }],
provide: HTTP_INTERCEPTORS, provideHttpClient(withInterceptorsFromDi())
useClass: ErrorInterceptorService, ] })
multi: true
},
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
],
bootstrap: [AppComponent]
})
// //
export class AppModule { export class AppModule {
} }

@ -1 +1 @@
Subproject commit ee1a55a529fde844f54761633e59f3be791717e3 Subproject commit eb0051dc347cdaa44476048dea9f6b61200f257f