moh-common-lib
Version:
A library of Angular components, services, and styles for B.C. Government Ministry of Health (MoH).
31 lines (29 loc) • 1.28 kB
TypeScript
import { InjectionToken, Injector } from '@angular/core';
import { PageStateService } from './page-state.service';
import { AbstractPageGuardService } from './abstract-page-guard.service';
export declare const START_PAGE_URL: InjectionToken<string>;
export declare const BYPASS_GUARDS: InjectionToken<boolean>;
/**
* Default page guard service, ByPassGuards & StartPageUrl are injected only if not extending service
*
* @example
*
* providers: [
* ...
* { provide: ByPassGuards, useValue: environment.bypassGuards },
* { provide: StartPageUrl, useValue: CREATE_FACILITY_PAGES.HOME.fullpath },
* DefaultPageGuardService
* { provide: AbstractPageGuardService, useExisting: DefaultPageGuardService },
* LoadPageGuardService
* ]
*
*/
export declare class DefaultPageGuardService implements AbstractPageGuardService {
private pageStateService;
private injector;
bypassGuards: boolean;
startPageUrl: string;
constructor(pageStateService: PageStateService, injector: Injector);
canBypassGuards(): boolean;
canNavigateToUrl(url: string): boolean;
}