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

This commit is contained in:
Alex Martzios 2024-07-09 14:53:00 +03:00
parent 5e51edbcb3
commit a18c1d6e0b
2 changed files with 44 additions and 50 deletions

View File

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

View File

@ -3,7 +3,7 @@ import {SharedModule} from './shared/shared.module';
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {AppComponent} from './app.component';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
@ -19,22 +19,17 @@ import {ConfigurationService} from "./openaireLibrary/utils/configuration/config
import {RouteReuseStrategy} from '@angular/router';
import {CustomRouteReuseStrategy} from './openaireLibrary/shared/custom-route-reuse-strategy';
@NgModule({
imports: [
SharedModule,
@NgModule({ declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent],
bootstrap: [AppComponent], imports: [SharedModule,
BrowserAnimationsModule,
CommonModule,
HttpClientModule,
ErrorModule,
NavigationBarModule, FeedbackModule, BottomModule,
CookieLawModule,
BrowserAnimationsModule,
BrowserModule,
AppRoutingModule
],
declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent],
providers: [
AppRoutingModule], providers: [
ConfigurationService,
{ provide: RouteReuseStrategy, useClass: CustomRouteReuseStrategy },
{ provide: APP_ID, useValue: 'eosc' },
@ -49,9 +44,8 @@ import {CustomRouteReuseStrategy} from './openaireLibrary/shared/custom-route-re
multi: true
},
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
],
bootstrap: [AppComponent]
})
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }],
provideHttpClient(withInterceptorsFromDi())
] })
export class AppModule {
}