L
Size: a a a
L
L
OM
DP
И
И
DP
DP
NO
~8.2.2ERROR TypeError: Cannot read property 'getAccessToken' of undefined …
@Injectable({
providedIn: 'root'
})
export class AuthInterceptor implements HttpInterceptor {
constructor(private auth: AuthService) {
console.log(this.auth)
}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const token = this.auth.getAccessToken();
…
Вキ
J
VH
~8.2.2ERROR TypeError: Cannot read property 'getAccessToken' of undefined …
@Injectable({
providedIn: 'root'
})
export class AuthInterceptor implements HttpInterceptor {
constructor(private auth: AuthService) {
console.log(this.auth)
}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const token = this.auth.getAccessToken();
…
AB
J
NO
NO
{
provide: HTTP_INTERCEPTORS,
useClass: AuthInterceptor,
multi: true,
deps: [
AuthService,
]
},NO
~8.2.2ERROR TypeError: Cannot read property 'getAccessToken' of undefined …
@Injectable({
providedIn: 'root'
})
export class AuthInterceptor implements HttpInterceptor {
constructor(private auth: AuthService) {
console.log(this.auth)
}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const token = this.auth.getAccessToken();
…
СК
NO