2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class ActivatedRoute {
|
2016-08-02 18:31:56 -04:00
|
|
|
children: ActivatedRoute[];
|
2016-08-10 21:21:28 -04:00
|
|
|
component: Type<any> | string;
|
2016-06-27 17:00:07 -04:00
|
|
|
data: Observable<Data>;
|
2016-08-02 18:31:56 -04:00
|
|
|
firstChild: ActivatedRoute;
|
|
|
|
fragment: Observable<string>;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
|
|
|
params: Observable<Params>;
|
2016-08-02 18:31:56 -04:00
|
|
|
parent: ActivatedRoute;
|
|
|
|
pathFromRoot: ActivatedRoute[];
|
|
|
|
queryParams: Observable<Params>;
|
2016-08-07 23:34:00 -04:00
|
|
|
root: ActivatedRoute;
|
2016-07-28 20:59:05 -04:00
|
|
|
routeConfig: Route;
|
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 {
|
2016-08-02 18:31:56 -04:00
|
|
|
children: ActivatedRouteSnapshot[];
|
2016-08-10 21:21:28 -04:00
|
|
|
component: Type<any> | string;
|
2016-06-27 17:00:07 -04:00
|
|
|
data: Data;
|
2016-08-02 18:31:56 -04:00
|
|
|
firstChild: ActivatedRouteSnapshot;
|
|
|
|
fragment: string;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
|
|
|
params: Params;
|
2016-08-02 18:31:56 -04:00
|
|
|
parent: ActivatedRouteSnapshot;
|
|
|
|
pathFromRoot: ActivatedRouteSnapshot[];
|
|
|
|
queryParams: Params;
|
2016-08-07 23:34:00 -04:00
|
|
|
root: ActivatedRouteSnapshot;
|
2016-07-28 20:59:05 -04:00
|
|
|
routeConfig: Route;
|
2016-07-25 15:15:07 -04:00
|
|
|
url: 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 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-07-13 21:12:59 -04:00
|
|
|
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: 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;
|
|
|
|
}
|
|
|
|
|
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-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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-08-05 11:24:40 -04:00
|
|
|
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized;
|
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-07-27 12:54:19 -04:00
|
|
|
useHash?: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-08-16 00:11:09 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare type LoadChildren = string | LoadChildrenCallback;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare type LoadChildrenCallback = () => Type<any> | Promise<Type<any>> | Observable<Type<any>>;
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-07-18 19:42:33 -04:00
|
|
|
/** @experimental */
|
|
|
|
export interface NavigationExtras {
|
|
|
|
fragment?: string;
|
2016-07-20 20:51:21 -04:00
|
|
|
preserveFragment?: boolean;
|
|
|
|
preserveQueryParams?: boolean;
|
2016-07-18 19:42:33 -04:00
|
|
|
queryParams?: Params;
|
|
|
|
relativeTo?: ActivatedRoute;
|
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 */
|
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-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-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-06-27 17:00:07 -04:00
|
|
|
export interface Resolve<T> {
|
2016-07-13 21:12:59 -04:00
|
|
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<any> | Promise<any> | any;
|
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;
|
|
|
|
};
|
|
|
|
|
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[];
|
|
|
|
children?: Route[];
|
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-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;
|
|
|
|
}
|
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 declare class Router {
|
2016-08-11 00:41:44 -04:00
|
|
|
config: Routes;
|
2016-06-23 21:19:32 -04:00
|
|
|
events: Observable<Event>;
|
2016-07-20 20:51:21 -04:00
|
|
|
/** @experimental */ navigated: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
routerState: RouterState;
|
|
|
|
url: string;
|
2016-08-16 16:40:28 -04:00
|
|
|
constructor(rootComponentType: Type<any>, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);
|
2016-07-20 20:51:21 -04:00
|
|
|
createUrlTree(commands: any[], {relativeTo, queryParams, fragment, preserveQueryParams, preserveFragment}?: 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-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-06-29 18:11:36 -04:00
|
|
|
/** @stable */
|
2016-06-28 19:47:13 -04:00
|
|
|
export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink | typeof RouterLinkWithHref | typeof RouterLinkActive)[];
|
2016-06-22 17:56:10 -04:00
|
|
|
|
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;
|
|
|
|
preserveQueryParams: boolean;
|
2016-06-29 18:11:36 -04:00
|
|
|
queryParams: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
|
|
|
routerLink: any[] | string;
|
|
|
|
urlTree: UrlTree;
|
2016-06-30 17:47:55 -04:00
|
|
|
constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);
|
2016-06-29 18:11:36 -04:00
|
|
|
onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @stable */
|
|
|
|
export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {
|
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;
|
|
|
|
};
|
2016-06-30 17:47:55 -04:00
|
|
|
constructor(router: Router, element: ElementRef, renderer: Renderer);
|
2016-06-29 18:11:36 -04:00
|
|
|
ngAfterContentInit(): void;
|
|
|
|
ngOnChanges(changes: {}): any;
|
|
|
|
ngOnDestroy(): any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @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;
|
|
|
|
};
|
|
|
|
routerLink: any[] | string;
|
2016-07-20 20:51:21 -04:00
|
|
|
routerLinkOptions: {
|
|
|
|
preserveQueryParams: boolean;
|
|
|
|
preserveFragment: boolean;
|
|
|
|
};
|
2016-06-29 18:11:36 -04:00
|
|
|
target: string;
|
|
|
|
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;
|
2016-06-29 18:11:36 -04:00
|
|
|
onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
|
|
}
|
|
|
|
|
2016-07-07 17:13:32 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare class RouterModule {
|
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 */
|
2016-08-01 19:56:38 -04:00
|
|
|
export declare class RouterOutlet implements OnDestroy {
|
2016-07-08 17:47:19 -04:00
|
|
|
activateEvents: EventEmitter<any>;
|
2016-06-29 18:11:36 -04:00
|
|
|
activatedRoute: ActivatedRoute;
|
|
|
|
component: Object;
|
2016-07-08 17:47:19 -04:00
|
|
|
deactivateEvents: EventEmitter<any>;
|
2016-06-29 18:11:36 -04:00
|
|
|
isActivated: boolean;
|
|
|
|
outletMap: RouterOutletMap;
|
2016-07-06 14:02:52 -04:00
|
|
|
constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string);
|
2016-07-18 19:07:12 -04:00
|
|
|
activate(activatedRoute: ActivatedRoute, loadedResolver: ComponentFactoryResolver, loadedInjector: Injector, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void;
|
2016-06-29 18:11:36 -04:00
|
|
|
deactivate(): void;
|
2016-08-01 19:56:38 -04:00
|
|
|
ngOnDestroy(): void;
|
2016-06-29 18:11:36 -04:00
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class RouterOutletMap {
|
|
|
|
registerOutlet(name: string, outlet: RouterOutlet): void;
|
2016-08-01 19:56:38 -04:00
|
|
|
removeOutlet(name: string): void;
|
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 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[];
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-07-25 15:15:07 -04:00
|
|
|
export declare class UrlSegment {
|
2016-06-22 17:56:10 -04:00
|
|
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-07-25 15:15:07 -04:00
|
|
|
root: UrlSegmentGroup;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|