Browse Source

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

pull/7301/head
KenTandrian 4 days ago
parent
commit
4332be5c4c
  1. 16
      apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts

16
apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts

@ -9,7 +9,7 @@ import {
Component, Component,
CUSTOM_ELEMENTS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA,
DestroyRef, DestroyRef,
Inject, inject,
ViewChild ViewChild
} from '@angular/core'; } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@ -63,12 +63,14 @@ export class GfUserAccountRegistrationDialogComponent {
protected readonly routerLinkAboutTermsOfService = protected readonly routerLinkAboutTermsOfService =
publicRoutes.about.subRoutes.termsOfService.routerLink; publicRoutes.about.subRoutes.termsOfService.routerLink;
public constructor( protected readonly data =
private changeDetectorRef: ChangeDetectorRef, inject<UserAccountRegistrationDialogParams>(MAT_DIALOG_DATA);
@Inject(MAT_DIALOG_DATA) protected data: UserAccountRegistrationDialogParams,
private dataService: DataService, private readonly changeDetectorRef = inject(ChangeDetectorRef);
private destroyRef: DestroyRef private readonly dataService = inject(DataService);
) { private readonly destroyRef = inject(DestroyRef);
public constructor() {
addIcons({ arrowForwardOutline, checkmarkOutline, copyOutline }); addIcons({ arrowForwardOutline, checkmarkOutline, copyOutline });
} }

Loading…
Cancel
Save