Skip to content

Commit

Permalink
Ensure ErrorComponent imports AsyncPipe and NgIf
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Dec 6, 2023
1 parent b1178b5 commit c21d9d7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Standalone/src/app/pages/error/error.component.ts
Original file line number Diff line number Diff line change
@@ -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<Error>;

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(() => {
Expand Down

0 comments on commit c21d9d7

Please sign in to comment.