moh-common-lib
Version:
A library of Angular components, services, and styles for B.C. Government Ministry of Health (MoH).
25 lines (24 loc) • 776 B
TypeScript
import { Route, Router } from '@angular/router';
export interface PageList {
index: number;
path: string;
isComplete: boolean;
[key: string]: any;
}
export declare class PageStateService {
protected router: Router;
pageList: PageList[];
constructor(router: Router);
setPages(arr: Route[], routeListConst: any, fn?: (x: any) => {
[key: string]: any;
}): PageList[];
findIndex(url?: string): number;
getPageAtIndex(idx: number): PageList | null;
setPageIncomplete(url?: string): void;
setPageComplete(path?: string): void;
canNavigateToPage(path?: string): boolean;
clearCompletePages(): void;
pageListIsClear(): boolean;
navigateByUrl(path: string): void;
private _find;
}