Browse Source

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

pull/7076/head
KenTandrian 4 weeks ago
parent
commit
bc69af47d4
  1. 25
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

25
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

@ -25,6 +25,7 @@ import {
ChangeDetectorRef, ChangeDetectorRef,
Component, Component,
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';
@ -120,17 +121,19 @@ export class GfAllocationsPageComponent implements OnInit {
public user: User; public user: User;
public worldMapChartFormat: string; public worldMapChartFormat: string;
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 dialog = inject(MatDialog);
private dialog: MatDialog, private readonly impersonationStorageService = inject(
private impersonationStorageService: ImpersonationStorageService, ImpersonationStorageService
private route: ActivatedRoute, );
private router: Router, private readonly route = inject(ActivatedRoute);
private userService: UserService private readonly router = inject(Router);
) { private readonly userService = inject(UserService);
public constructor() {
this.route.queryParams this.route.queryParams
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((params: AllocationsPageParams) => { .subscribe((params: AllocationsPageParams) => {

Loading…
Cancel
Save