Browse Source

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

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

Loading…
Cancel
Save