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-06-22 17:56:10 -04:00
|
|
|
component: Type | 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-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-06-22 17:56:10 -04:00
|
|
|
component: Type | 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-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-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-07-27 12:54:19 -04:00
|
|
|
useHash?: 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 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-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-06-27 15:27:23 -04:00
|
|
|
/** @experimental */
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare function provideRouter(config: Routes, opts?: ExtraOptions): any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-07-27 12:54:19 -04:00
|
|
|
/** @deprecated */
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare function provideRouterConfig(config: ExtraOptions): any;
|
|
|
|
|
2016-07-27 12:54:19 -04:00
|
|
|
/** @deprecated */
|
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[];
|
|
|
|
component?: Type | string;
|
|
|
|
data?: Data;
|
|
|
|
loadChildren?: string;
|
|
|
|
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-27 23:10:36 -04:00
|
|
|
/** @deprecated */ terminal?: boolean;
|
2016-07-28 17:36:05 -04:00
|
|
|
}
|
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-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-07-18 06:50:31 -04:00
|
|
|
constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector, loader: NgModuleFactoryLoader, 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-07-06 19:19:52 -04:00
|
|
|
/** @deprecated */
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare type RouterConfig = Route[];
|
|
|
|
|
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-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> {
|
2016-08-02 18:31:56 -04:00
|
|
|
/** @deprecated */ fragment: Observable<string>;
|
|
|
|
/** @deprecated */ queryParams: Observable<Params>;
|
2016-06-22 17:56:10 -04:00
|
|
|
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-08-02 18:31:56 -04:00
|
|
|
/** @deprecated */ fragment: string;
|
|
|
|
/** @deprecated */ queryParams: Params;
|
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;
|
|
|
|
}
|