Browse Source

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

pull/7214/head
KenTandrian 2 months ago
parent
commit
6f9120f345
  1. 8
      apps/client/src/app/pages/api/api-page.component.ts

8
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 =

Loading…
Cancel
Save