2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ActivatedRoute {
|
|
|
|
component: Type | string;
|
2016-06-27 17:00:07 -04:00
|
|
|
data: Observable<Data>;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
|
|
|
params: Observable<Params>;
|
2016-06-22 17:56:10 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot;
|
2016-06-23 21:19:32 -04:00
|
|
|
url: Observable<UrlPathWithParams[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ActivatedRouteSnapshot {
|
|
|
|
component: Type | string;
|
2016-06-27 17:00:07 -04:00
|
|
|
data: Data;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
|
|
|
params: Params;
|
|
|
|
url: UrlPathWithParams[];
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanActivate {
|
|
|
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanDeactivate<T> {
|
|
|
|
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-27 17:00:07 -04:00
|
|
|
export declare type Data = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class DefaultUrlSerializer implements UrlSerializer {
|
|
|
|
parse(url: string): UrlTree;
|
|
|
|
serialize(tree: UrlTree): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface ExtraOptions {
|
|
|
|
enableTracing?: boolean;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class NavigationCancel {
|
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
constructor(id: number, url: string);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class NavigationEnd {
|
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
urlAfterRedirects: string;
|
|
|
|
constructor(id: number, url: string, urlAfterRedirects: string);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class NavigationError {
|
2016-06-23 21:19:32 -04:00
|
|
|
error: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
constructor(id: number, url: string, error: any);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class NavigationStart {
|
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
constructor(id: number, url: string);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare type Params = {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const PRIMARY_OUTLET: string;
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare function provideRouter(config: RouterConfig, opts?: ExtraOptions): any[];
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-27 17:00:07 -04:00
|
|
|
export interface Resolve<T> {
|
|
|
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<any> | any;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-27 17:00:07 -04:00
|
|
|
export declare type ResolveData = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface Route {
|
2016-06-23 21:19:32 -04:00
|
|
|
path?: string;
|
2016-06-27 23:10:36 -04:00
|
|
|
pathMatch?:
|
|
|
|
/** @deprecated */ terminal?: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class Router {
|
2016-06-23 21:19:32 -04:00
|
|
|
events: Observable<Event>;
|
2016-06-22 17:56:10 -04:00
|
|
|
routerState: RouterState;
|
|
|
|
url: string;
|
|
|
|
createUrlTree(commands: any[], {relativeTo, queryParams, fragment}?: NavigationExtras): UrlTree;
|
|
|
|
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
|
2016-06-23 21:19:32 -04:00
|
|
|
navigateByUrl(url: string | UrlTree): Promise<boolean>;
|
2016-06-22 17:56:10 -04:00
|
|
|
parseUrl(url: string): UrlTree;
|
2016-06-23 21:19:32 -04:00
|
|
|
resetConfig(config: RouterConfig): void;
|
|
|
|
serializeUrl(url: UrlTree): string;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink | typeof RouterLinkActive)[];
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare type RouterConfig = Route[];
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RouterOutletMap {
|
|
|
|
registerOutlet(name: string, outlet: RouterOutlet): void;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RouterState extends Tree<ActivatedRoute> {
|
|
|
|
fragment: Observable<string>;
|
2016-06-23 21:19:32 -04:00
|
|
|
queryParams: Observable<Params>;
|
2016-06-22 17:56:10 -04:00
|
|
|
snapshot: RouterStateSnapshot;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
|
|
|
fragment: string;
|
2016-06-23 21:19:32 -04:00
|
|
|
queryParams: Params;
|
|
|
|
url: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RoutesRecognized {
|
|
|
|
id: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
state: RouterStateSnapshot;
|
2016-06-22 17:56:10 -04:00
|
|
|
url: string;
|
|
|
|
urlAfterRedirects: string;
|
|
|
|
constructor(id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot);
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class UrlPathWithParams {
|
|
|
|
parameters: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
path: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(path: string, parameters: {
|
|
|
|
[key: string]: string;
|
|
|
|
});
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
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-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class UrlTree {
|
2016-06-23 21:19:32 -04:00
|
|
|
fragment: string;
|
2016-06-22 17:56:10 -04:00
|
|
|
queryParams: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
2016-06-23 21:19:32 -04:00
|
|
|
root: UrlSegment;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|