2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
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
|
|
|
/** @experimental */
|
|
|
|
export declare class ActivationEnd {
|
|
|
|
snapshot: ActivatedRouteSnapshot;
|
|
|
|
constructor(
|
|
|
|
snapshot: ActivatedRouteSnapshot);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare class ActivationStart {
|
|
|
|
snapshot: ActivatedRouteSnapshot;
|
|
|
|
constructor(
|
|
|
|
snapshot: ActivatedRouteSnapshot);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanActivate {
|
2016-07-13 21:12:59 -04:00
|
|
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export interface CanActivateChild {
|
|
|
|
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanDeactivate<T> {
|
2016-12-27 17:08:06 -05:00
|
|
|
canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-07-26 17:39:02 -04:00
|
|
|
/** @stable */
|
|
|
|
export interface CanLoad {
|
|
|
|
canLoad(route: Route): Observable<boolean> | Promise<boolean> | boolean;
|
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
/** @experimental */
|
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(
|
2017-09-04 16:00:59 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-07-25 14:13:15 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
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(
|
2017-09-04 16:00:59 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-07-25 14:13:15 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
/** @stable */
|
|
|
|
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
|
|
|
/** @stable */
|
|
|
|
export declare function convertToParamMap(params: Params): ParamMap;
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-27 17:00:07 -04:00
|
|
|
export declare type Data = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
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
|
|
|
/** @experimental */
|
|
|
|
export declare type DetachedRouteHandle = {};
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2017-09-06 14:00:32 -04:00
|
|
|
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-08-16 16:40:28 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface ExtraOptions {
|
|
|
|
enableTracing?: boolean;
|
2016-08-25 10:56:30 -04:00
|
|
|
errorHandler?: ErrorHandler;
|
2017-03-07 17:27:20 -05:00
|
|
|
initialNavigation?: InitialNavigation;
|
2017-10-19 18:32:50 -04:00
|
|
|
onSameUrlNavigation?: 'reload' | 'ignore';
|
2016-09-16 20:31:24 -04:00
|
|
|
preloadingStrategy?: any;
|
2016-07-27 12:54:19 -04:00
|
|
|
useHash?: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2017-07-01 13:30:17 -04:00
|
|
|
/** @experimental */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot,
|
|
|
|
shouldActivate: boolean);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
2016-08-16 00:11:09 -04:00
|
|
|
export declare type LoadChildren = string | LoadChildrenCallback;
|
|
|
|
|
2016-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
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
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
reason: string);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
error: any);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-08-30 18:57:24 -04:00
|
|
|
/** @stable */
|
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
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class NavigationStart extends RouterEvent {
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-09-16 20:31:24 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class NoPreloading implements PreloadingStrategy {
|
|
|
|
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
/** @stable */
|
|
|
|
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
|
|
|
/** @stable */
|
|
|
|
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-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare type Params = {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-09-16 20:31:24 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class PreloadAllModules implements PreloadingStrategy {
|
|
|
|
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class PreloadingStrategy {
|
|
|
|
abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
2016-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
2017-02-07 22:27:01 -05:00
|
|
|
export declare const PRIMARY_OUTLET = "primary";
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-08-16 16:40:28 -04:00
|
|
|
/** @stable */
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare function provideRoutes(routes: Routes): any;
|
2016-07-06 14:02:52 -04:00
|
|
|
|
2016-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
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
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-27 17:00:07 -04:00
|
|
|
export declare type ResolveData = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2017-07-01 13:30:17 -04:00
|
|
|
/** @experimental */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
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(
|
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-02-01 16:13:57 -05:00
|
|
|
/** @experimental */
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class RouteConfigLoadEnd {
|
|
|
|
route: Route;
|
|
|
|
constructor(
|
|
|
|
route: Route);
|
2017-02-01 16:13:57 -05:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
/** @experimental */
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class RouteConfigLoadStart {
|
2017-07-25 14:13:15 -04:00
|
|
|
route: Route;
|
|
|
|
constructor(
|
|
|
|
route: Route);
|
2017-09-05 14:54:33 -04:00
|
|
|
toString(): string;
|
2017-07-25 14:13:15 -04:00
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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>;
|
2016-09-12 13:02:48 -04:00
|
|
|
navigated: boolean;
|
2017-10-19 18:32:50 -04:00
|
|
|
onSameUrlNavigation: 'reload' | 'ignore';
|
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;
|
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
|
|
|
}
|
|
|
|
|
2016-11-09 16:33:33 -05:00
|
|
|
/** @stable */
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;
|
2016-11-09 16:33:33 -05:00
|
|
|
|
|
|
|
/** @experimental */
|
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
|
|
|
/** @experimental */
|
|
|
|
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
|
|
|
/** @experimental */
|
|
|
|
export declare class RouterEvent {
|
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
constructor(
|
|
|
|
id: number,
|
|
|
|
url: string);
|
|
|
|
}
|
|
|
|
|
2016-06-29 18:11:36 -04:00
|
|
|
/** @stable */
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
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-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
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);
|
2016-07-27 12:54:19 -04:00
|
|
|
static forChild(routes: Routes): ModuleWithProviders;
|
|
|
|
static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2016-06-29 18:11:36 -04:00
|
|
|
/** @stable */
|
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;
|
2017-05-19 14:50:33 -04:00
|
|
|
readonly activatedRouteData: {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
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
|
|
|
}
|
|
|
|
|
2016-11-09 16:33:33 -05:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RouterState extends Tree<ActivatedRoute> {
|
|
|
|
snapshot: RouterStateSnapshot;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
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
|
|
|
/** @stable */
|
|
|
|
export declare type Routes = Route[];
|
|
|
|
|
2017-02-15 16:30:40 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare const ROUTES: InjectionToken<Route[][]>;
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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(
|
|
|
|
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
|
|
|
/** @experimental */
|
|
|
|
export declare type RunGuardsAndResolvers = 'paramsChange' | 'paramsOrQueryParamsChange' | 'always';
|
|
|
|
|
2016-10-20 13:44:44 -04:00
|
|
|
/** @experimental */
|
|
|
|
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
|
|
|
/** @experimental */
|
|
|
|
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare type UrlMatchResult = {
|
|
|
|
consumed: UrlSegment[];
|
|
|
|
posParams?: {
|
|
|
|
[name: string]: UrlSegment;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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(
|
|
|
|
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
|
|
|
/** @stable */
|
|
|
|
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(
|
|
|
|
segments: UrlSegment[],
|
|
|
|
children: {
|
|
|
|
[key: string]: UrlSegmentGroup;
|
|
|
|
});
|
|
|
|
hasChildren(): boolean;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-08-17 18:35:30 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class UrlSerializer {
|
|
|
|
abstract parse(url: string): UrlTree;
|
|
|
|
abstract serialize(tree: UrlTree): string;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
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;
|
2016-06-22 17:56:10 -04:00
|
|
|
queryParams: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
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
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export declare const VERSION: Version;
|