import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, Resolve } from '@angular/router'; import { Observable, of as observableOf } from 'rxjs'; @Injectable({ providedIn: 'root', }) export class UpdateTableResolver implements Resolve { constructor() {} resolve(route: ActivatedRouteSnapshot): Observable { return route.queryParamMap.get('bill') !== null ? observableOf(false) : observableOf(true); } }