From 4c2016846437f8ef85ef0fcb2af35d96f9b160ad Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 4 Apr 2026 16:30:00 +0700 Subject: [PATCH] feat(client): replace constructor based DI with inject functions --- .../create-or-update-account-dialog.component.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts index ec6c10c63..562147750 100644 --- a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts +++ b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts @@ -5,7 +5,7 @@ import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; import { DataService } from '@ghostfolio/ui/services'; import { CommonModule, NgClass } from '@angular/common'; -import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { AbstractControl, FormBuilder, @@ -56,12 +56,12 @@ export class GfCreateOrUpdateAccountDialogComponent { public filteredPlatforms: Observable | undefined; public platforms: Platform[] = []; - public constructor( - @Inject(MAT_DIALOG_DATA) public data: CreateOrUpdateAccountDialogParams, - private dataService: DataService, - public dialogRef: MatDialogRef, - private formBuilder: FormBuilder - ) {} + protected readonly data = + inject(MAT_DIALOG_DATA); + private readonly dataService = inject(DataService); + private readonly dialogRef = + inject>(MatDialogRef); + private readonly formBuilder = inject(FormBuilder); public ngOnInit() { const { currencies } = this.dataService.fetchInfo();