Browse Source

feat(client): migrate constructor based DI to inject function

pull/6893/head
KenTandrian 1 week ago
parent
commit
f8fdcddc46
  1. 23
      apps/client/src/app/components/admin-tag/admin-tag.component.ts

23
apps/client/src/app/components/admin-tag/admin-tag.component.ts

@ -11,6 +11,7 @@ import {
ChangeDetectorRef, ChangeDetectorRef,
Component, Component,
DestroyRef, DestroyRef,
inject,
Input, Input,
OnInit, OnInit,
ViewChild ViewChild
@ -61,17 +62,17 @@ export class GfAdminTagComponent implements OnInit {
public displayedColumns = ['name', 'userId', 'activities', 'actions']; public displayedColumns = ['name', 'userId', 'activities', 'actions'];
public tags: Tag[]; public tags: Tag[];
public constructor( private readonly changeDetectorRef = inject(ChangeDetectorRef);
private changeDetectorRef: ChangeDetectorRef, private readonly dataService = inject(DataService);
private dataService: DataService, private readonly destroyRef = inject(DestroyRef);
private destroyRef: DestroyRef, private readonly deviceDetectorService = inject(DeviceDetectorService);
private deviceDetectorService: DeviceDetectorService, private readonly dialog = inject(MatDialog);
private dialog: MatDialog, private readonly notificationService = inject(NotificationService);
private notificationService: NotificationService, private readonly route = inject(ActivatedRoute);
private route: ActivatedRoute, private readonly router = inject(Router);
private router: Router, private readonly userService = inject(UserService);
private userService: UserService
) { public constructor() {
this.route.queryParams this.route.queryParams
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((params) => { .subscribe((params) => {

Loading…
Cancel
Save