Skip to content

Commit

Permalink
upgrade to angular 18.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenjohanson committed Oct 9, 2024
1 parent 2d7c2fc commit 55c85c2
Show file tree
Hide file tree
Showing 4 changed files with 2,850 additions and 2,913 deletions.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "17.3.4",
"@angular/common": "17.3.4",
"@angular/core": "17.3.4",
"@angular/forms": "17.3.4",
"@angular/platform-browser": "17.3.4",
"@angular/platform-browser-dynamic": "17.3.4",
"@angular/router": "17.3.4",
"@angular/service-worker": "17.3.4",
"@angular/animations": "18.2.7",
"@angular/common": "18.2.7",
"@angular/core": "18.2.7",
"@angular/forms": "18.2.7",
"@angular/platform-browser": "18.2.7",
"@angular/platform-browser-dynamic": "18.2.7",
"@angular/router": "18.2.7",
"@angular/service-worker": "18.2.7",
"@ffmpeg/ffmpeg": "0.12.10",
"@ffmpeg/util": "0.12.1",
"@ionic/angular": "8.2.6",
Expand All @@ -39,20 +39,20 @@
"swiper": "11.1.4",
"tslib": "2.6.3",
"webm-writer": "1.0.0",
"zone.js": "0.14.5"
"zone.js": "0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.3.6",
"@angular-eslint/builder": "17.3.0",
"@angular-eslint/eslint-plugin": "17.4.0",
"@angular-eslint/eslint-plugin-template": "17.5.1",
"@angular-eslint/template-parser": "17.5.1",
"@angular/cli": "^17.3.8",
"@angular/compiler": "17.3.4",
"@angular/compiler-cli": "17.3.4",
"@angular/language-service": "17.3.7",
"@angular/localize": "17.3.4",
"@ionic/angular-toolkit": "11.0.1",
"@angular-devkit/build-angular": "18.2.7",
"@angular-eslint/builder": "18.3.1",
"@angular-eslint/eslint-plugin": "18.3.1",
"@angular-eslint/eslint-plugin-template": "18.3.1",
"@angular-eslint/template-parser": "18.3.1",
"@angular/cli": "^18.2.7",
"@angular/compiler": "18.2.7",
"@angular/compiler-cli": "18.2.7",
"@angular/language-service": "18.2.7",
"@angular/localize": "18.2.7",
"@ionic/angular-toolkit": "12.1.1",
"@types/dom-mediacapture-record": "1.0.19",
"@types/file-saver": "2.0.7",
"@types/jasmine": "5.1.4",
Expand Down
20 changes: 7 additions & 13 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RouteReuseStrategy } from '@angular/router';
import { ServiceWorkerModule } from '@angular/service-worker';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { HttpClient, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
// Modules and Components
import { environment } from '@environment/environment';
import { AppRoutingModule } from './app-routing.module';
Expand All @@ -16,19 +16,16 @@ import { PipesModule } from '@pipes/pipes.module';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

export const translationLoaderFactory = (http: HttpClient) => new TranslateHttpLoader(http);
@NgModule({
declarations: [AppComponent],
@NgModule({ declarations: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [
BrowserModule,
bootstrap: [AppComponent], imports: [BrowserModule,
IonicModule.forRoot({
mode: 'md' // force material UI mode, iOS has not been styled
mode: 'md' // force material UI mode, iOS has not been styled
}),
AppRoutingModule,
BrowserAnimationsModule,
ComponentsModule,
PipesModule,
HttpClientModule,
TranslateModule.forRoot({
loader: { provide: TranslateLoader, useFactory: translationLoaderFactory, deps: [HttpClient] }
}),
Expand All @@ -38,11 +35,8 @@ export const translationLoaderFactory = (http: HttpClient) => new TranslateHttpL
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000'
}),
NgbModule
],
providers: [
NgbModule], providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
],
bootstrap: [AppComponent]
})
provideHttpClient(withInterceptorsFromDi()),
] })
export class AppModule { }
4 changes: 2 additions & 2 deletions src/app/components/countdown/countdown.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

import { CountdownComponent } from './countdown.component';
import { TranslateModule } from '@ngx-translate/core';
Expand All @@ -7,7 +7,7 @@ describe('CountdownComponent', () => {
let component: CountdownComponent;
let fixture: ComponentFixture<CountdownComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ CountdownComponent ],
imports: [TranslateModule.forRoot()]
Expand Down
Loading

0 comments on commit 55c85c2

Please sign in to comment.