Browse Source

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

pull/6921/head
KenTandrian 4 days ago
parent
commit
036ec1bbef
  1. 15
      apps/client/src/app/components/home-market/home-market.component.ts

15
apps/client/src/app/components/home-market/home-market.component.ts

@ -18,6 +18,7 @@ import {
Component,
CUSTOM_ELEMENTS_SCHEMA,
DestroyRef,
inject,
OnInit
} from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@ -47,13 +48,13 @@ export class GfHomeMarketComponent implements OnInit {
private readonly info: InfoItem;
public constructor(
private readonly changeDetectorRef: ChangeDetectorRef,
private readonly dataService: DataService,
private readonly destroyRef: DestroyRef,
private readonly deviceDetectorService: DeviceDetectorService,
private readonly userService: UserService
) {
private readonly changeDetectorRef = inject(ChangeDetectorRef);
private readonly dataService = inject(DataService);
private readonly destroyRef = inject(DestroyRef);
private readonly deviceDetectorService = inject(DeviceDetectorService);
private readonly userService = inject(UserService);
public constructor() {
this.deviceType = this.deviceDetectorService.getDeviceInfo().deviceType;
this.info = this.dataService.fetchInfo();

Loading…
Cancel
Save