UNPKG

@rxap/life-cycle

Version:

Provides an Angular service and guard to manage application lifecycle. It allows to execute code when the application is stable and ready. Includes a guard to prevent route activation until the app is ready.

12 lines (11 loc) 558 B
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { LifeCycleService } from './life-cycle.service'; import * as i0 from "@angular/core"; export declare class IsAppReadyGuard { private readonly lifecycle; constructor(lifecycle: LifeCycleService); canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>; static ɵfac: i0.ɵɵFactoryDeclaration<IsAppReadyGuard, never>; static ɵprov: i0.ɵɵInjectableDeclaration<IsAppReadyGuard>; }