From c21d9d756b0511cd5fc890eff405a105ce5f0d01 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 6 Dec 2023 14:36:00 +0100 Subject: [PATCH] Ensure ErrorComponent imports AsyncPipe and NgIf --- Standalone/src/app/pages/error/error.component.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Standalone/src/app/pages/error/error.component.ts b/Standalone/src/app/pages/error/error.component.ts index 85d499e0..8d10244d 100644 --- a/Standalone/src/app/pages/error/error.component.ts +++ b/Standalone/src/app/pages/error/error.component.ts @@ -1,19 +1,26 @@ +import { AsyncPipe, NgIf } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { AuthService } from '@auth0/auth0-angular'; -import { timer } from 'rxjs'; +import { Observable, timer } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @Component({ selector: 'app-error', templateUrl: './error.component.html', - standalone: true + standalone: true, + imports: [ + AsyncPipe, + NgIf + ] }) export class ErrorComponent implements OnInit { - public error$ = this.auth.error$; + public error$: Observable; - constructor(private auth: AuthService, private router: Router) {} + constructor(private auth: AuthService, private router: Router) { + this.error$ = this.auth.error$; + } ngOnInit() { timer(0).pipe(takeUntil(this.error$)).subscribe(() => {