2016-06-22 17:56:10 -04:00
|
|
|
export declare class ActivatedRoute {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly children: ActivatedRoute[];
|
2017-04-17 14:13:13 -04:00
|
|
|
component: Type<any> | string | null;
|
2016-06-27 17:00:07 -04:00
|
|
|
data: Observable<Data>;
|
2017-04-17 14:13:13 -04:00
|
|
|
readonly firstChild: ActivatedRoute | null;
|
2016-08-02 18:31:56 -04:00
|
|
|
fragment: Observable<string>;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
2017-03-17 13:09:42 -04:00
|
|
|
readonly paramMap: Observable<ParamMap>;
|
2016-06-23 21:19:32 -04:00
|
|
|
params: Observable<Params>;
|
2017-04-17 14:13:13 -04:00
|
|
|
readonly parent: ActivatedRoute | null;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly pathFromRoot: ActivatedRoute[];
|
2017-03-17 13:09:42 -04:00
|
|
|
readonly queryParamMap: Observable<ParamMap>;
|
2016-08-02 18:31:56 -04:00
|
|
|
queryParams: Observable<Params>;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly root: ActivatedRoute;
|
2017-04-17 14:13:13 -04:00
|
|
|
readonly routeConfig: Route | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot;
|
2016-07-25 15:15:07 -04:00
|
|
|
url: Observable<UrlSegment[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class ActivatedRouteSnapshot {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly children: ActivatedRouteSnapshot[];
|
2017-04-17 14:13:13 -04:00
|
|
|
component: Type<any> | string | null;
|
2016-06-27 17:00:07 -04:00
|
|
|
data: Data;
|
2017-04-17 14:13:13 -04:00
|
|
|
readonly firstChild: ActivatedRouteSnapshot | null;
|
2016-08-02 18:31:56 -04:00
|
|
|
fragment: string;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
2017-03-17 13:09:42 -04:00
|
|
|
readonly paramMap: ParamMap;
|
2016-06-23 21:19:32 -04:00
|
|
|
params: Params;
|
2017-04-17 14:13:13 -04:00
|
|
|
readonly parent: ActivatedRouteSnapshot | null;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly pathFromRoot: ActivatedRouteSnapshot[];
|
2017-03-17 13:09:42 -04:00
|
|
|
readonly queryParamMap: ParamMap;
|
2016-08-02 18:31:56 -04:00
|
|
|
queryParams: Params;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly root: ActivatedRouteSnapshot;
|
2017-04-17 14:13:13 -04:00
|
|
|
readonly routeConfig: Route | null;
|
2016-07-25 15:15:07 -04:00
|
|
|
url: UrlSegment[];
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-09-06 14:00:32 -04:00
|
|
|
export declare class ActivationEnd {
|
|
|
|
snapshot: ActivatedRouteSnapshot;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-09-06 14:00:32 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class ActivationStart {
|
|
|
|
snapshot: ActivatedRouteSnapshot;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-09-06 14:00:32 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanActivate {
|
2018-10-03 18:35:13 -04:00
|
|
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
2016-07-13 21:12:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface CanActivateChild {
|
2018-10-03 18:35:13 -04:00
|
|
|
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface CanDeactivate<T> {
|
2018-10-03 18:35:13 -04:00
|
|
|
canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-07-26 17:39:02 -04:00
|
|
|
export interface CanLoad {
|
2017-07-19 14:48:39 -04:00
|
|
|
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean;
|
2016-07-26 17:39:02 -04:00
|
|
|
}
|
|
|
|
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class ChildActivationEnd {
|
2017-09-04 16:00:59 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot;
|
2017-09-05 14:54:33 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-07-25 14:13:15 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class ChildActivationStart {
|
2017-09-04 16:00:59 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot;
|
2017-09-05 14:54:33 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-07-25 14:13:15 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
export declare class ChildrenOutletContexts {
|
|
|
|
getContext(childName: string): OutletContext | null;
|
|
|
|
getOrCreateContext(childName: string): OutletContext;
|
|
|
|
onChildOutletCreated(childName: string, outlet: RouterOutlet): void;
|
|
|
|
onChildOutletDestroyed(childName: string): void;
|
|
|
|
onOutletDeactivated(): Map<string, OutletContext>;
|
|
|
|
onOutletReAttached(contexts: Map<string, OutletContext>): void;
|
|
|
|
}
|
|
|
|
|
2017-03-20 12:19:25 -04:00
|
|
|
export declare function convertToParamMap(params: Params): ParamMap;
|
|
|
|
|
2016-06-27 17:00:07 -04:00
|
|
|
export declare type Data = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class DefaultUrlSerializer implements UrlSerializer {
|
|
|
|
parse(url: string): UrlTree;
|
|
|
|
serialize(tree: UrlTree): string;
|
|
|
|
}
|
|
|
|
|
2016-11-30 02:21:41 -05:00
|
|
|
export declare type DetachedRouteHandle = {};
|
|
|
|
|
2018-05-17 07:33:50 -04:00
|
|
|
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
|
|
|
export interface ExtraOptions {
|
2018-05-17 07:33:50 -04:00
|
|
|
anchorScrolling?: 'disabled' | 'enabled';
|
2016-06-22 17:56:10 -04:00
|
|
|
enableTracing?: boolean;
|
2016-08-25 10:56:30 -04:00
|
|
|
errorHandler?: ErrorHandler;
|
2017-03-07 17:27:20 -05:00
|
|
|
initialNavigation?: InitialNavigation;
|
2018-04-10 06:01:07 -04:00
|
|
|
malformedUriErrorHandler?: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
2017-10-19 18:32:50 -04:00
|
|
|
onSameUrlNavigation?: 'reload' | 'ignore';
|
2017-11-28 19:57:10 -05:00
|
|
|
paramsInheritanceStrategy?: 'emptyOnly' | 'always';
|
2016-09-16 20:31:24 -04:00
|
|
|
preloadingStrategy?: any;
|
2018-02-23 04:24:51 -05:00
|
|
|
relativeLinkResolution?: 'legacy' | 'corrected';
|
2018-05-17 07:33:50 -04:00
|
|
|
scrollOffset?: [number, number] | (() => [number, number]);
|
|
|
|
scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';
|
2018-07-10 12:44:15 -04:00
|
|
|
urlUpdateStrategy?: 'deferred' | 'eager';
|
2016-07-27 12:54:19 -04:00
|
|
|
useHash?: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class GuardsCheckEnd extends RouterEvent {
|
2017-07-01 13:30:17 -04:00
|
|
|
shouldActivate: boolean;
|
|
|
|
state: RouterStateSnapshot;
|
|
|
|
urlAfterRedirects: string;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot,
|
|
|
|
shouldActivate: boolean);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class GuardsCheckStart extends RouterEvent {
|
2017-07-01 13:30:17 -04:00
|
|
|
state: RouterStateSnapshot;
|
|
|
|
urlAfterRedirects: string;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-08-16 00:11:09 -04:00
|
|
|
export declare type LoadChildren = string | LoadChildrenCallback;
|
|
|
|
|
2017-01-18 18:56:34 -05:00
|
|
|
export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Promise<Type<any>> | Observable<Type<any>>;
|
2016-08-16 00:11:09 -04:00
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class NavigationCancel extends RouterEvent {
|
2016-08-24 13:20:44 -04:00
|
|
|
reason: string;
|
2016-09-12 13:02:48 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
reason: string);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class NavigationEnd extends RouterEvent {
|
2016-06-22 17:56:10 -04:00
|
|
|
urlAfterRedirects: string;
|
2016-09-12 13:02:48 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class NavigationError extends RouterEvent {
|
2016-06-23 21:19:32 -04:00
|
|
|
error: any;
|
2016-09-12 13:02:48 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
error: any);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-07-18 19:42:33 -04:00
|
|
|
export interface NavigationExtras {
|
|
|
|
fragment?: string;
|
2016-07-20 20:51:21 -04:00
|
|
|
preserveFragment?: boolean;
|
2017-01-25 04:33:13 -05:00
|
|
|
/** @deprecated */ preserveQueryParams?: boolean;
|
2017-04-14 17:40:56 -04:00
|
|
|
queryParams?: Params | null;
|
|
|
|
queryParamsHandling?: QueryParamsHandling | null;
|
|
|
|
relativeTo?: ActivatedRoute | null;
|
2016-08-12 17:30:51 -04:00
|
|
|
replaceUrl?: boolean;
|
2016-08-04 14:46:09 -04:00
|
|
|
skipLocationChange?: boolean;
|
2016-07-18 19:42:33 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class NavigationStart extends RouterEvent {
|
2018-01-24 12:19:59 -05:00
|
|
|
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange';
|
|
|
|
restoredState?: {
|
|
|
|
navigationId: number;
|
|
|
|
} | null;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange',
|
|
|
|
restoredState?: {
|
2018-01-24 12:19:59 -05:00
|
|
|
navigationId: number;
|
|
|
|
} | null);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-09-16 20:31:24 -04:00
|
|
|
export declare class NoPreloading implements PreloadingStrategy {
|
|
|
|
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
export declare class OutletContext {
|
|
|
|
attachRef: ComponentRef<any> | null;
|
|
|
|
children: ChildrenOutletContexts;
|
|
|
|
outlet: RouterOutlet | null;
|
|
|
|
resolver: ComponentFactoryResolver | null;
|
|
|
|
route: ActivatedRoute | null;
|
|
|
|
}
|
|
|
|
|
2017-03-17 13:09:42 -04:00
|
|
|
export interface ParamMap {
|
2017-03-20 12:19:25 -04:00
|
|
|
readonly keys: string[];
|
2017-03-17 13:09:42 -04:00
|
|
|
get(name: string): string | null;
|
|
|
|
getAll(name: string): string[];
|
|
|
|
has(name: string): boolean;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare type Params = {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-09-16 20:31:24 -04:00
|
|
|
export declare class PreloadAllModules implements PreloadingStrategy {
|
|
|
|
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare abstract class PreloadingStrategy {
|
|
|
|
abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
2017-02-07 22:27:01 -05:00
|
|
|
export declare const PRIMARY_OUTLET = "primary";
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare function provideRoutes(routes: Routes): any;
|
2016-07-06 14:02:52 -04:00
|
|
|
|
2016-06-27 17:00:07 -04:00
|
|
|
export interface Resolve<T> {
|
2016-12-08 14:24:38 -05:00
|
|
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T> | Promise<T> | T;
|
2016-06-27 17:00:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export declare type ResolveData = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class ResolveEnd extends RouterEvent {
|
2017-07-01 13:30:17 -04:00
|
|
|
state: RouterStateSnapshot;
|
|
|
|
urlAfterRedirects: string;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class ResolveStart extends RouterEvent {
|
2017-07-01 13:30:17 -04:00
|
|
|
state: RouterStateSnapshot;
|
|
|
|
urlAfterRedirects: string;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface Route {
|
2016-07-28 17:36:05 -04:00
|
|
|
canActivate?: any[];
|
|
|
|
canActivateChild?: any[];
|
|
|
|
canDeactivate?: any[];
|
|
|
|
canLoad?: any[];
|
2016-12-06 13:41:01 -05:00
|
|
|
children?: Routes;
|
2016-08-16 16:40:28 -04:00
|
|
|
component?: Type<any>;
|
2016-07-28 17:36:05 -04:00
|
|
|
data?: Data;
|
2016-08-16 00:11:09 -04:00
|
|
|
loadChildren?: LoadChildren;
|
2016-11-09 18:25:47 -05:00
|
|
|
matcher?: UrlMatcher;
|
2016-07-28 17:36:05 -04:00
|
|
|
outlet?: string;
|
2016-06-23 21:19:32 -04:00
|
|
|
path?: string;
|
2016-07-28 17:36:05 -04:00
|
|
|
pathMatch?: string;
|
|
|
|
redirectTo?: string;
|
|
|
|
resolve?: ResolveData;
|
2017-02-24 01:12:30 -05:00
|
|
|
runGuardsAndResolvers?: RunGuardsAndResolvers;
|
2016-07-28 17:36:05 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class RouteConfigLoadEnd {
|
|
|
|
route: Route;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
route: Route);
|
2017-02-01 16:13:57 -05:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class RouteConfigLoadStart {
|
2017-07-25 14:13:15 -04:00
|
|
|
route: Route;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
route: Route);
|
2017-09-05 14:54:33 -04:00
|
|
|
toString(): string;
|
2017-07-25 14:13:15 -04:00
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class Router {
|
2016-08-11 00:41:44 -04:00
|
|
|
config: Routes;
|
2016-08-25 10:56:30 -04:00
|
|
|
errorHandler: ErrorHandler;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly events: Observable<Event>;
|
2018-04-10 06:01:07 -04:00
|
|
|
malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
2016-09-12 13:02:48 -04:00
|
|
|
navigated: boolean;
|
2017-10-19 18:32:50 -04:00
|
|
|
onSameUrlNavigation: 'reload' | 'ignore';
|
2017-11-28 19:57:10 -05:00
|
|
|
paramsInheritanceStrategy: 'emptyOnly' | 'always';
|
2018-02-23 04:24:51 -05:00
|
|
|
relativeLinkResolution: 'legacy' | 'corrected';
|
2016-11-30 02:21:41 -05:00
|
|
|
routeReuseStrategy: RouteReuseStrategy;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly routerState: RouterState;
|
|
|
|
readonly url: string;
|
2016-10-20 13:44:44 -04:00
|
|
|
urlHandlingStrategy: UrlHandlingStrategy;
|
2018-07-10 12:44:15 -04:00
|
|
|
urlUpdateStrategy: 'deferred' | 'eager';
|
2017-05-17 20:47:34 -04:00
|
|
|
constructor(rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);
|
2017-06-12 13:59:29 -04:00
|
|
|
createUrlTree(commands: any[], navigationExtras?: NavigationExtras): UrlTree;
|
2016-07-14 20:29:01 -04:00
|
|
|
dispose(): void;
|
|
|
|
initialNavigation(): void;
|
2016-07-28 20:59:05 -04:00
|
|
|
isActive(url: string | UrlTree, exact: boolean): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
|
2016-08-04 14:46:09 -04:00
|
|
|
navigateByUrl(url: string | UrlTree, extras?: NavigationExtras): Promise<boolean>;
|
2016-08-02 10:54:14 -04:00
|
|
|
ngOnDestroy(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
parseUrl(url: string): UrlTree;
|
2016-07-06 19:19:52 -04:00
|
|
|
resetConfig(config: Routes): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
serializeUrl(url: UrlTree): string;
|
2016-08-25 11:48:31 -04:00
|
|
|
setUpLocationChangeListener(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;
|
2016-11-09 16:33:33 -05:00
|
|
|
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<any>) => void>;
|
2016-11-09 16:33:33 -05:00
|
|
|
|
2016-11-30 02:21:41 -05:00
|
|
|
export declare abstract class RouteReuseStrategy {
|
2017-04-17 14:13:13 -04:00
|
|
|
abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;
|
2016-11-30 02:21:41 -05:00
|
|
|
abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;
|
|
|
|
abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;
|
|
|
|
abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
|
2017-04-17 14:13:13 -04:00
|
|
|
abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;
|
2016-11-30 02:21:41 -05:00
|
|
|
}
|
|
|
|
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class RouterEvent {
|
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string);
|
2017-09-05 14:54:33 -04:00
|
|
|
}
|
|
|
|
|
2016-06-29 18:11:36 -04:00
|
|
|
export declare class RouterLink {
|
|
|
|
fragment: string;
|
2016-07-20 20:51:21 -04:00
|
|
|
preserveFragment: boolean;
|
2017-02-01 18:48:09 -05:00
|
|
|
/** @deprecated */ preserveQueryParams: boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
queryParams: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
2017-01-25 04:33:13 -05:00
|
|
|
queryParamsHandling: QueryParamsHandling;
|
2016-11-14 21:30:13 -05:00
|
|
|
replaceUrl: boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
routerLink: any[] | string;
|
2016-11-14 21:30:13 -05:00
|
|
|
skipLocationChange: boolean;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly urlTree: UrlTree;
|
2017-06-20 07:24:39 -04:00
|
|
|
constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef);
|
2016-11-02 14:30:00 -04:00
|
|
|
onClick(): boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly isActive: boolean;
|
2016-06-30 17:47:55 -04:00
|
|
|
links: QueryList<RouterLink>;
|
|
|
|
linksWithHrefs: QueryList<RouterLinkWithHref>;
|
2016-06-29 18:11:36 -04:00
|
|
|
routerLinkActive: string[] | string;
|
2016-08-15 03:39:59 -04:00
|
|
|
routerLinkActiveOptions: {
|
|
|
|
exact: boolean;
|
|
|
|
};
|
2017-06-20 07:24:39 -04:00
|
|
|
constructor(router: Router, element: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef);
|
2016-06-29 18:11:36 -04:00
|
|
|
ngAfterContentInit(): void;
|
2016-12-06 19:22:38 -05:00
|
|
|
ngOnChanges(changes: SimpleChanges): void;
|
2016-12-06 09:19:50 -05:00
|
|
|
ngOnDestroy(): void;
|
2016-06-29 18:11:36 -04:00
|
|
|
}
|
|
|
|
|
2016-06-30 21:24:43 -04:00
|
|
|
export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
|
2016-06-29 18:11:36 -04:00
|
|
|
fragment: string;
|
|
|
|
href: string;
|
2016-07-20 20:51:21 -04:00
|
|
|
preserveFragment: boolean;
|
|
|
|
preserveQueryParams: boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
queryParams: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
2017-01-25 04:33:13 -05:00
|
|
|
queryParamsHandling: QueryParamsHandling;
|
2016-11-14 21:30:13 -05:00
|
|
|
replaceUrl: boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
routerLink: any[] | string;
|
2016-11-14 21:30:13 -05:00
|
|
|
skipLocationChange: boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
target: string;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly urlTree: UrlTree;
|
2016-07-27 12:54:19 -04:00
|
|
|
constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);
|
2016-06-29 18:11:36 -04:00
|
|
|
ngOnChanges(changes: {}): any;
|
2016-06-30 21:24:43 -04:00
|
|
|
ngOnDestroy(): any;
|
2017-05-25 20:52:55 -04:00
|
|
|
onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
}
|
|
|
|
|
2016-07-07 17:13:32 -04:00
|
|
|
export declare class RouterModule {
|
2017-03-14 17:32:26 -04:00
|
|
|
constructor(guard: any, router: Router);
|
2018-07-09 14:36:30 -04:00
|
|
|
static forChild(routes: Routes): ModuleWithProviders<RouterModule>;
|
|
|
|
static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule>;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
export declare class RouterOutlet implements OnDestroy, OnInit {
|
2016-07-08 17:47:19 -04:00
|
|
|
activateEvents: EventEmitter<any>;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly activatedRoute: ActivatedRoute;
|
2018-06-25 05:11:22 -04:00
|
|
|
readonly activatedRouteData: Data;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly component: Object;
|
2016-07-08 17:47:19 -04:00
|
|
|
deactivateEvents: EventEmitter<any>;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly isActivated: boolean;
|
2017-05-17 20:47:34 -04:00
|
|
|
constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef);
|
|
|
|
activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;
|
2016-11-30 02:21:41 -05:00
|
|
|
attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): void;
|
2016-06-29 18:11:36 -04:00
|
|
|
deactivate(): void;
|
2016-11-30 02:21:41 -05:00
|
|
|
detach(): ComponentRef<any>;
|
2016-08-01 19:56:38 -04:00
|
|
|
ngOnDestroy(): void;
|
2017-05-17 20:47:34 -04:00
|
|
|
ngOnInit(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-04-04 19:00:40 -04:00
|
|
|
export declare class RouterPreloader implements OnDestroy {
|
2016-11-09 16:33:33 -05:00
|
|
|
constructor(router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, preloadingStrategy: PreloadingStrategy);
|
|
|
|
ngOnDestroy(): void;
|
|
|
|
preload(): Observable<any>;
|
|
|
|
setUpPreloading(): void;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RouterState extends Tree<ActivatedRoute> {
|
|
|
|
snapshot: RouterStateSnapshot;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
2016-06-23 21:19:32 -04:00
|
|
|
url: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare type Routes = Route[];
|
|
|
|
|
2017-02-15 16:30:40 -05:00
|
|
|
export declare const ROUTES: InjectionToken<Route[][]>;
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class RoutesRecognized extends RouterEvent {
|
2016-06-23 21:19:32 -04:00
|
|
|
state: RouterStateSnapshot;
|
2016-06-22 17:56:10 -04:00
|
|
|
urlAfterRedirects: string;
|
2016-09-12 13:02:48 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-02-24 01:12:30 -05:00
|
|
|
export declare type RunGuardsAndResolvers = 'paramsChange' | 'paramsOrQueryParamsChange' | 'always';
|
|
|
|
|
2018-05-17 07:33:50 -04:00
|
|
|
export declare class Scroll {
|
|
|
|
readonly anchor: string | null;
|
|
|
|
readonly position: [number, number] | null;
|
|
|
|
readonly routerEvent: NavigationEnd;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
routerEvent: NavigationEnd,
|
|
|
|
position: [number, number] | null,
|
|
|
|
anchor: string | null);
|
2018-05-17 07:33:50 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-10-20 13:44:44 -04:00
|
|
|
export declare abstract class UrlHandlingStrategy {
|
|
|
|
abstract extract(url: UrlTree): UrlTree;
|
|
|
|
abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;
|
|
|
|
abstract shouldProcessUrl(url: UrlTree): boolean;
|
|
|
|
}
|
|
|
|
|
2017-06-24 03:08:18 -04:00
|
|
|
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult;
|
|
|
|
|
|
|
|
export declare type UrlMatchResult = {
|
|
|
|
consumed: UrlSegment[];
|
|
|
|
posParams?: {
|
|
|
|
[name: string]: UrlSegment;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-07-25 15:15:07 -04:00
|
|
|
export declare class UrlSegment {
|
2017-03-17 13:09:42 -04:00
|
|
|
readonly parameterMap: ParamMap;
|
2016-06-22 17:56:10 -04:00
|
|
|
parameters: {
|
2016-12-09 13:44:46 -05:00
|
|
|
[name: string]: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
path: string;
|
2016-09-12 13:02:48 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
path: string,
|
|
|
|
parameters: {
|
2016-12-09 13:44:46 -05:00
|
|
|
[name: string]: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
});
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-10-20 13:44:44 -04:00
|
|
|
export declare class UrlSegmentGroup {
|
|
|
|
children: {
|
|
|
|
[key: string]: UrlSegmentGroup;
|
|
|
|
};
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly numberOfChildren: number;
|
2017-04-17 14:13:13 -04:00
|
|
|
parent: UrlSegmentGroup | null;
|
2016-10-20 13:44:44 -04:00
|
|
|
segments: UrlSegment[];
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
segments: UrlSegment[],
|
|
|
|
children: {
|
2016-10-20 13:44:44 -04:00
|
|
|
[key: string]: UrlSegmentGroup;
|
|
|
|
});
|
|
|
|
hasChildren(): boolean;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class UrlSerializer {
|
|
|
|
abstract parse(url: string): UrlTree;
|
|
|
|
abstract serialize(tree: UrlTree): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class UrlTree {
|
2017-04-17 14:13:13 -04:00
|
|
|
fragment: string | null;
|
2017-03-17 13:09:42 -04:00
|
|
|
readonly queryParamMap: ParamMap;
|
2017-10-24 07:54:08 -04:00
|
|
|
queryParams: Params;
|
2016-07-25 15:15:07 -04:00
|
|
|
root: UrlSegmentGroup;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
2016-11-30 16:52:08 -05:00
|
|
|
|
|
|
|
export declare const VERSION: Version;
|