Browse Source

feat(client): replace constructor based DI with inject function

pull/6926/head
KenTandrian 2 days ago
parent
commit
de1e4c5e7d
  1. 19
      apps/client/src/app/components/home-summary/home-summary.component.ts

19
apps/client/src/app/components/home-summary/home-summary.component.ts

@ -14,6 +14,7 @@ import {
Component,
CUSTOM_ELEMENTS_SCHEMA,
DestroyRef,
inject,
OnInit
} from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@ -39,14 +40,16 @@ export class GfHomeSummaryComponent implements OnInit {
public summary: PortfolioSummary;
public user: User;
public constructor(
private changeDetectorRef: ChangeDetectorRef,
private dataService: DataService,
private destroyRef: DestroyRef,
private deviceDetectorService: DeviceDetectorService,
private impersonationStorageService: ImpersonationStorageService,
private userService: UserService
) {
private readonly changeDetectorRef = inject(ChangeDetectorRef);
private readonly dataService = inject(DataService);
private readonly destroyRef = inject(DestroyRef);
private readonly deviceDetectorService = inject(DeviceDetectorService);
private readonly impersonationStorageService = inject(
ImpersonationStorageService
);
private readonly userService = inject(UserService);
public constructor() {
this.info = this.dataService.fetchInfo();
this.hasPermissionForSubscription = hasPermission(

Loading…
Cancel
Save