@rfprodz/client-pwa-offline
Version:
PWA offline feature for Angular clients.
17 lines (16 loc) • 742 B
TypeScript
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Router } from '@angular/router';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
/**
* PWA offline interceptor.
* Redirects to a dedicated view when the app goes offline.
*/
export declare class AppPwaOfflineInterceptor implements HttpInterceptor {
private readonly navigator;
private readonly router;
constructor(navigator: Navigator, router: Router);
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
static ɵfac: i0.ɵɵFactoryDeclaration<AppPwaOfflineInterceptor, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<AppPwaOfflineInterceptor>;
}