2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanActivate {
|
|
|
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
|
|
|
}
|
|
|
|
|
2016-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanDeactivate<T> {
|
|
|
|
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<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-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-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-06 14:02:52 -04:00
|
|
|
/** @experimental */
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare function provideRouterConfig(config: ExtraOptions): any;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
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> {
|
|
|
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<any> | any;
|
|
|
|
}
|
|
|
|
|
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-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-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-06-22 17:56:10 -04:00
|
|
|
routerState: RouterState;
|
|
|
|
url: string;
|
2016-07-06 19:19:52 -04:00
|
|
|
constructor(rootComponentType: Type, resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector, loader: AppModuleFactoryLoader, config: Routes);
|
2016-06-22 17:56:10 -04:00
|
|
|
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-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;
|
|
|
|
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;
|
|
|
|
queryParams: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
|
|
|
routerLink: any[] | string;
|
|
|
|
target: string;
|
|
|
|
urlTree: UrlTree;
|
|
|
|
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 {
|
|
|
|
constructor(injector: Injector);
|
|
|
|
}
|
|
|
|
|
2016-06-29 18:11:36 -04:00
|
|
|
/** @stable */
|
|
|
|
export declare class RouterOutlet {
|
|
|
|
activatedRoute: ActivatedRoute;
|
|
|
|
component: Object;
|
|
|
|
isActivated: boolean;
|
|
|
|
outletMap: RouterOutletMap;
|
2016-07-06 14:02:52 -04:00
|
|
|
constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string);
|
|
|
|
activate(activatedRoute: ActivatedRoute, loadedResolver: ComponentFactoryResolver, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void;
|
2016-06-29 18:11:36 -04:00
|
|
|
deactivate(): void;
|
|
|
|
}
|
|
|
|
|
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-06-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-28 17:49:29 -04:00
|
|
|
/** @stable */
|
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-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-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-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-06-23 21:19:32 -04:00
|
|
|
root: UrlSegment;
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|