From 6f9120f345443173cd5d6485280bc71292b44cc0 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 4 Jul 2026 19:53:22 +0700 Subject: [PATCH] feat(client): replace constructor based DI with inject functions --- apps/client/src/app/pages/api/api-page.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/client/src/app/pages/api/api-page.component.ts b/apps/client/src/app/pages/api/api-page.component.ts index b9e921f9ec..27ee4cb52a 100644 --- a/apps/client/src/app/pages/api/api-page.component.ts +++ b/apps/client/src/app/pages/api/api-page.component.ts @@ -20,7 +20,7 @@ import { HttpHeaders, HttpParams } from '@angular/common/http'; -import { Component, DestroyRef, OnInit } from '@angular/core'; +import { Component, DestroyRef, inject, OnInit } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { MatCardModule } from '@angular/material/card'; import { format, startOfYear } from 'date-fns'; @@ -53,10 +53,8 @@ export class GfApiPageComponent implements OnInit { private apiKey: string; - public constructor( - private destroyRef: DestroyRef, - private http: HttpClient - ) {} + private readonly destroyRef = inject(DestroyRef); + private readonly http = inject(HttpClient); public ngOnInit() { this.apiKey =