From f8fdcddc46faaa58dc88d4385dc7860dbc331a55 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sun, 17 May 2026 16:18:24 +0700 Subject: [PATCH] feat(client): migrate constructor based DI to inject function --- .../admin-tag/admin-tag.component.ts | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/client/src/app/components/admin-tag/admin-tag.component.ts b/apps/client/src/app/components/admin-tag/admin-tag.component.ts index de891418d..4edd014aa 100644 --- a/apps/client/src/app/components/admin-tag/admin-tag.component.ts +++ b/apps/client/src/app/components/admin-tag/admin-tag.component.ts @@ -11,6 +11,7 @@ import { ChangeDetectorRef, Component, DestroyRef, + inject, Input, OnInit, ViewChild @@ -61,17 +62,17 @@ export class GfAdminTagComponent implements OnInit { public displayedColumns = ['name', 'userId', 'activities', 'actions']; public tags: Tag[]; - public constructor( - private changeDetectorRef: ChangeDetectorRef, - private dataService: DataService, - private destroyRef: DestroyRef, - private deviceDetectorService: DeviceDetectorService, - private dialog: MatDialog, - private notificationService: NotificationService, - private route: ActivatedRoute, - private router: Router, - private userService: UserService - ) { + private readonly changeDetectorRef = inject(ChangeDetectorRef); + private readonly dataService = inject(DataService); + private readonly destroyRef = inject(DestroyRef); + private readonly deviceDetectorService = inject(DeviceDetectorService); + private readonly dialog = inject(MatDialog); + private readonly notificationService = inject(NotificationService); + private readonly route = inject(ActivatedRoute); + private readonly router = inject(Router); + private readonly userService = inject(UserService); + + public constructor() { this.route.queryParams .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((params) => {