Browse Source

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

pull/6957/head
KenTandrian 3 months ago
parent
commit
0b4e2494a3
  1. 16
      apps/client/src/app/core/http-response.interceptor.ts

16
apps/client/src/app/core/http-response.interceptor.ts

@ -12,7 +12,7 @@ import {
HttpInterceptor, HttpInterceptor,
HttpRequest HttpRequest
} from '@angular/common/http'; } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { import {
MatSnackBar, MatSnackBar,
MatSnackBarRef, MatSnackBarRef,
@ -29,13 +29,13 @@ export class HttpResponseInterceptor implements HttpInterceptor {
public info: InfoItem; public info: InfoItem;
public snackBarRef: MatSnackBarRef<TextOnlySnackBar> | undefined; public snackBarRef: MatSnackBarRef<TextOnlySnackBar> | undefined;
public constructor( private readonly dataService = inject(DataService);
private dataService: DataService, private readonly router = inject(Router);
private router: Router, private readonly snackBar = inject(MatSnackBar);
private snackBar: MatSnackBar, private readonly userService = inject(UserService);
private userService: UserService, private readonly webAuthnService = inject(WebAuthnService);
private webAuthnService: WebAuthnService
) { public constructor() {
this.info = this.dataService.fetchInfo(); this.info = this.dataService.fetchInfo();
} }

Loading…
Cancel
Save