Browse Source

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

pull/6892/head
KenTandrian 1 week ago
parent
commit
08fc19c6ca
  1. 25
      apps/client/src/app/components/admin-platform/admin-platform.component.ts

25
apps/client/src/app/components/admin-platform/admin-platform.component.ts

@ -12,6 +12,7 @@ import {
ChangeDetectorRef, ChangeDetectorRef,
Component, Component,
DestroyRef, DestroyRef,
inject,
Input, Input,
OnInit, OnInit,
ViewChild ViewChild
@ -63,18 +64,18 @@ export class GfAdminPlatformComponent implements OnInit {
public displayedColumns = ['name', 'url', 'accounts', 'actions']; public displayedColumns = ['name', 'url', 'accounts', 'actions'];
public platforms: Platform[]; public platforms: Platform[];
public constructor( private readonly adminService = inject(AdminService);
private adminService: AdminService, 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