2016-06-22 17:56:10 -04:00
|
|
|
export declare class ActivatedRoute {
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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>;
|
2019-11-09 13:36:22 -05:00
|
|
|
get firstChild(): ActivatedRoute | null;
|
2016-08-02 18:31:56 -04:00
|
|
|
fragment: Observable<string>;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
2019-11-09 13:36:22 -05:00
|
|
|
get paramMap(): Observable<ParamMap>;
|
2016-06-23 21:19:32 -04:00
|
|
|
params: Observable<Params>;
|
2019-11-09 13:36:22 -05:00
|
|
|
get parent(): ActivatedRoute | null;
|
|
|
|
get pathFromRoot(): ActivatedRoute[];
|
|
|
|
get queryParamMap(): Observable<ParamMap>;
|
2016-08-02 18:31:56 -04:00
|
|
|
queryParams: Observable<Params>;
|
2019-11-09 13:36:22 -05:00
|
|
|
get root(): ActivatedRoute;
|
|
|
|
get 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class ActivatedRouteSnapshot {
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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;
|
2019-11-09 13:36:22 -05:00
|
|
|
get firstChild(): ActivatedRouteSnapshot | null;
|
2016-08-02 18:31:56 -04:00
|
|
|
fragment: string;
|
2016-06-23 21:19:32 -04:00
|
|
|
outlet: string;
|
2019-11-09 13:36:22 -05:00
|
|
|
get paramMap(): ParamMap;
|
2016-06-23 21:19:32 -04:00
|
|
|
params: Params;
|
2019-11-09 13:36:22 -05:00
|
|
|
get parent(): ActivatedRouteSnapshot | null;
|
|
|
|
get pathFromRoot(): ActivatedRouteSnapshot[];
|
|
|
|
get queryParamMap(): ParamMap;
|
2016-08-02 18:31:56 -04:00
|
|
|
queryParams: Params;
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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
|
|
|
export declare class ActivationEnd {
|
|
|
|
snapshot: ActivatedRouteSnapshot;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-09-06 14:00:32 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class ActivationStart {
|
|
|
|
snapshot: ActivatedRouteSnapshot;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-09-06 14:00:32 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export interface CanActivate {
|
2018-10-03 18:35:13 -04:00
|
|
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
2016-07-13 21:12:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface CanActivateChild {
|
2018-10-03 18:35:13 -04:00
|
|
|
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface CanDeactivate<T> {
|
2018-10-03 18:35:13 -04:00
|
|
|
canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2016-07-26 17:39:02 -04:00
|
|
|
export interface CanLoad {
|
2017-07-19 14:48:39 -04:00
|
|
|
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean;
|
2016-07-26 17:39:02 -04:00
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-07-25 14:13:15 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
snapshot: ActivatedRouteSnapshot);
|
2017-07-25 14:13:15 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
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
|
|
|
export declare function convertToParamMap(params: Params): ParamMap;
|
|
|
|
|
2016-06-27 17:00:07 -04:00
|
|
|
export declare type Data = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class DefaultUrlSerializer implements UrlSerializer {
|
|
|
|
parse(url: string): UrlTree;
|
|
|
|
serialize(tree: UrlTree): string;
|
|
|
|
}
|
|
|
|
|
feat(router): deprecate loadChildren:string (#30073)
The proposed ES dynamic import() is now supported by the Angular CLI and the
larger toolchain. This renders the `loadChildren: string` API largely
redundant, as import() is far more natural, is less error-prone, and is
standards compliant. This commit deprecates the `string` form of
`loadChildren` in favor of dynamic import().
DEPRECATION:
When defining lazy-loaded route, Angular previously offered two options for
configuring the module to be loaded, both via the `loadChildren` parameter
of the route. Most Angular developers are familiar withthe `string` form of
this API. For example, the following route definition configures Angular to
load a `LazyModule` NgModule from `lazy-route/lazy.module.ts`:
```
[{
path: 'lazy',
loadChildren: 'lazy-route/lazy.module#LazyModule',
}]
```
This "magic string" configuration was previously necessary as there was
no dynamic module loading standard on the web. This has changed with the
pending standardization of dynamic `import()` expressions, which are now
supported in the Angular CLI and in web tooling in general. `import()`
offers a more natural and robust solution to dynamic module loading. The
above example can be rewritten to use dynamic `import()`:
```
[{
path: 'lazy',
loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),
}]
```
This form of lazy loading offers significant advantages in terms of:
* type checking via TypeScript
* simplicity of generated code
* future potential to run natively in supporting browsers
(see: [caniuse: dynamic import()](https://caniuse.com/#feat=es6-module-dynamic-import))
As a result, Angular is deprecating the `loadChildren: string` syntax in
favor of ES dynamic `import()`. An automatic migration will run during
`ng upgrade` to convert your existing Angular code to the new syntax.
PR Close #30073
2019-04-23 17:30:09 -04:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type DeprecatedLoadChildren = string;
|
|
|
|
|
2016-11-30 02:21:41 -05:00
|
|
|
export declare type DetachedRouteHandle = {};
|
|
|
|
|
2018-05-17 07:33:50 -04:00
|
|
|
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
|
|
|
export interface ExtraOptions {
|
2018-05-17 07:33:50 -04:00
|
|
|
anchorScrolling?: 'disabled' | 'enabled';
|
2016-06-22 17:56:10 -04:00
|
|
|
enableTracing?: boolean;
|
2016-08-25 10:56:30 -04:00
|
|
|
errorHandler?: ErrorHandler;
|
2017-03-07 17:27:20 -05:00
|
|
|
initialNavigation?: InitialNavigation;
|
2018-04-10 06:01:07 -04:00
|
|
|
malformedUriErrorHandler?: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
2017-10-19 18:32:50 -04:00
|
|
|
onSameUrlNavigation?: 'reload' | 'ignore';
|
2017-11-28 19:57:10 -05:00
|
|
|
paramsInheritanceStrategy?: 'emptyOnly' | 'always';
|
2016-09-16 20:31:24 -04:00
|
|
|
preloadingStrategy?: any;
|
2018-02-23 04:24:51 -05:00
|
|
|
relativeLinkResolution?: 'legacy' | 'corrected';
|
2018-05-17 07:33:50 -04:00
|
|
|
scrollOffset?: [number, number] | (() => [number, number]);
|
|
|
|
scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';
|
2018-07-10 12:44:15 -04:00
|
|
|
urlUpdateStrategy?: 'deferred' | 'eager';
|
2016-07-27 12:54:19 -04:00
|
|
|
useHash?: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot,
|
|
|
|
shouldActivate: boolean);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2019-09-16 18:14:04 -04:00
|
|
|
/** @deprecated */
|
|
|
|
export declare type InitialNavigation = true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';
|
|
|
|
|
feat(router): deprecate loadChildren:string (#30073)
The proposed ES dynamic import() is now supported by the Angular CLI and the
larger toolchain. This renders the `loadChildren: string` API largely
redundant, as import() is far more natural, is less error-prone, and is
standards compliant. This commit deprecates the `string` form of
`loadChildren` in favor of dynamic import().
DEPRECATION:
When defining lazy-loaded route, Angular previously offered two options for
configuring the module to be loaded, both via the `loadChildren` parameter
of the route. Most Angular developers are familiar withthe `string` form of
this API. For example, the following route definition configures Angular to
load a `LazyModule` NgModule from `lazy-route/lazy.module.ts`:
```
[{
path: 'lazy',
loadChildren: 'lazy-route/lazy.module#LazyModule',
}]
```
This "magic string" configuration was previously necessary as there was
no dynamic module loading standard on the web. This has changed with the
pending standardization of dynamic `import()` expressions, which are now
supported in the Angular CLI and in web tooling in general. `import()`
offers a more natural and robust solution to dynamic module loading. The
above example can be rewritten to use dynamic `import()`:
```
[{
path: 'lazy',
loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),
}]
```
This form of lazy loading offers significant advantages in terms of:
* type checking via TypeScript
* simplicity of generated code
* future potential to run natively in supporting browsers
(see: [caniuse: dynamic import()](https://caniuse.com/#feat=es6-module-dynamic-import))
As a result, Angular is deprecating the `loadChildren: string` syntax in
favor of ES dynamic `import()`. An automatic migration will run during
`ng upgrade` to convert your existing Angular code to the new syntax.
PR Close #30073
2019-04-23 17:30:09 -04:00
|
|
|
export declare type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren;
|
2016-08-16 00:11:09 -04:00
|
|
|
|
2019-04-11 09:23:17 -04:00
|
|
|
export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Observable<Type<any>> | Promise<NgModuleFactory<any> | Type<any> | any>;
|
2016-08-16 00:11:09 -04:00
|
|
|
|
2018-11-29 13:07:24 -05:00
|
|
|
export declare type Navigation = {
|
|
|
|
id: number;
|
|
|
|
initialUrl: string | UrlTree;
|
|
|
|
extractedUrl: UrlTree;
|
|
|
|
finalUrl?: UrlTree;
|
|
|
|
trigger: 'imperative' | 'popstate' | 'hashchange';
|
|
|
|
extras: NavigationExtras;
|
|
|
|
previousNavigation: Navigation | null;
|
|
|
|
};
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
reason: string);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
error: any);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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;
|
2018-11-29 13:07:24 -05:00
|
|
|
state?: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
2016-07-18 19:42:33 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 14:13:15 -04:00
|
|
|
export declare class NavigationStart extends RouterEvent {
|
2018-01-24 12:19:59 -05:00
|
|
|
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange';
|
|
|
|
restoredState?: {
|
2018-11-29 13:07:24 -05:00
|
|
|
[k: string]: any;
|
2018-01-24 12:19:59 -05:00
|
|
|
navigationId: number;
|
|
|
|
} | null;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange',
|
|
|
|
restoredState?: {
|
2018-11-29 13:07:24 -05:00
|
|
|
[k: string]: any;
|
2018-01-24 12:19:59 -05:00
|
|
|
navigationId: number;
|
|
|
|
} | null);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-09-16 20:31:24 -04:00
|
|
|
export declare class NoPreloading implements PreloadingStrategy {
|
|
|
|
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
2017-05-17 20:47:34 -04:00
|
|
|
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
|
|
|
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-06-22 17:56:10 -04:00
|
|
|
export declare type Params = {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
|
|
|
|
2016-09-16 20:31:24 -04:00
|
|
|
export declare class PreloadAllModules implements PreloadingStrategy {
|
|
|
|
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare abstract class PreloadingStrategy {
|
|
|
|
abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
|
|
|
}
|
|
|
|
|
2017-02-07 22:27:01 -05:00
|
|
|
export declare const PRIMARY_OUTLET = "primary";
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2016-07-06 19:19:52 -04:00
|
|
|
export declare function provideRoutes(routes: Routes): any;
|
2016-07-06 14:02:52 -04:00
|
|
|
|
2019-07-03 19:15:15 -04:00
|
|
|
export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
export declare type ResolveData = {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2017-07-01 13:30:17 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
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-09-05 14:54:33 -04:00
|
|
|
export declare class RouteConfigLoadEnd {
|
|
|
|
route: Route;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
route: Route);
|
2017-02-01 16:13:57 -05:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2017-09-05 14:54:33 -04:00
|
|
|
export declare class RouteConfigLoadStart {
|
2017-07-25 14:13:15 -04:00
|
|
|
route: Route;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
route: Route);
|
2017-09-05 14:54:33 -04:00
|
|
|
toString(): string;
|
2017-07-25 14:13:15 -04:00
|
|
|
}
|
|
|
|
|
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>;
|
2018-04-10 06:01:07 -04:00
|
|
|
malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
2016-09-12 13:02:48 -04:00
|
|
|
navigated: boolean;
|
2017-10-19 18:32:50 -04:00
|
|
|
onSameUrlNavigation: 'reload' | 'ignore';
|
2017-11-28 19:57:10 -05:00
|
|
|
paramsInheritanceStrategy: 'emptyOnly' | 'always';
|
2018-02-23 04:24:51 -05:00
|
|
|
relativeLinkResolution: 'legacy' | 'corrected';
|
2016-11-30 02:21:41 -05:00
|
|
|
routeReuseStrategy: RouteReuseStrategy;
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly routerState: RouterState;
|
2019-11-09 13:36:22 -05:00
|
|
|
get url(): string;
|
2016-10-20 13:44:44 -04:00
|
|
|
urlHandlingStrategy: UrlHandlingStrategy;
|
2018-07-10 12:44:15 -04:00
|
|
|
urlUpdateStrategy: 'deferred' | 'eager';
|
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;
|
2018-11-29 13:07:24 -05:00
|
|
|
getCurrentNavigation(): Navigation | null;
|
2016-07-14 20:29:01 -04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2017-01-03 19:54:46 -05:00
|
|
|
export declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;
|
2016-11-09 16:33:33 -05:00
|
|
|
|
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
|
|
|
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
|
|
|
export declare class RouterEvent {
|
|
|
|
id: number;
|
|
|
|
url: string;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string);
|
2017-09-05 14:54:33 -04:00
|
|
|
}
|
|
|
|
|
2016-06-29 18:11:36 -04:00
|
|
|
export declare class RouterLink {
|
|
|
|
fragment: string;
|
2016-07-20 20:51:21 -04:00
|
|
|
preserveFragment: boolean;
|
2019-11-09 13:36:22 -05:00
|
|
|
/** @deprecated */ set preserveQueryParams(value: 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;
|
2019-11-09 13:36:22 -05:00
|
|
|
set routerLink(commands: any[] | string);
|
2016-11-14 21:30:13 -05:00
|
|
|
skipLocationChange: boolean;
|
2018-11-29 13:07:24 -05:00
|
|
|
state?: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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
|
|
|
}
|
|
|
|
|
|
|
|
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>;
|
2019-11-09 13:36:22 -05:00
|
|
|
set routerLinkActive(data: string[] | string);
|
2016-08-15 03:39:59 -04:00
|
|
|
routerLinkActiveOptions: {
|
|
|
|
exact: boolean;
|
|
|
|
};
|
2019-02-06 08:24:25 -05:00
|
|
|
constructor(router: Router, element: ElementRef, renderer: Renderer2, link?: RouterLink | undefined, linkWithHref?: RouterLinkWithHref | undefined);
|
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
|
|
|
}
|
|
|
|
|
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;
|
2019-11-09 13:36:22 -05:00
|
|
|
set preserveQueryParams(value: 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;
|
2019-11-09 13:36:22 -05:00
|
|
|
set routerLink(commands: any[] | string);
|
2016-11-14 21:30:13 -05:00
|
|
|
skipLocationChange: boolean;
|
2018-11-29 13:07:24 -05:00
|
|
|
state?: {
|
|
|
|
[k: string]: any;
|
|
|
|
};
|
2016-06-29 18:11:36 -04:00
|
|
|
target: string;
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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-07-07 17:13:32 -04:00
|
|
|
export declare class RouterModule {
|
2017-03-14 17:32:26 -04:00
|
|
|
constructor(guard: any, router: Router);
|
2018-07-09 14:36:30 -04:00
|
|
|
static forChild(routes: Routes): ModuleWithProviders<RouterModule>;
|
|
|
|
static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule>;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
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>;
|
2019-11-09 13:36:22 -05:00
|
|
|
get activatedRoute(): ActivatedRoute;
|
|
|
|
get activatedRouteData(): Data;
|
|
|
|
get component(): Object;
|
2016-07-08 17:47:19 -04:00
|
|
|
deactivateEvents: EventEmitter<any>;
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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
|
|
|
}
|
|
|
|
|
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-22 17:56:10 -04:00
|
|
|
export declare class RouterState extends Tree<ActivatedRoute> {
|
|
|
|
snapshot: RouterStateSnapshot;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
export declare type Routes = Route[];
|
|
|
|
|
2017-02-15 16:30:40 -05:00
|
|
|
export declare const ROUTES: InjectionToken<Route[][]>;
|
|
|
|
|
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(
|
2018-06-25 05:11:22 -04:00
|
|
|
id: number,
|
|
|
|
url: string,
|
|
|
|
urlAfterRedirects: string,
|
|
|
|
state: RouterStateSnapshot);
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2018-12-14 14:02:50 -05:00
|
|
|
export declare type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);
|
2017-02-24 01:12:30 -05:00
|
|
|
|
2018-05-17 07:33:50 -04:00
|
|
|
export declare class Scroll {
|
|
|
|
readonly anchor: string | null;
|
|
|
|
readonly position: [number, number] | null;
|
|
|
|
readonly routerEvent: NavigationEnd;
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
routerEvent: NavigationEnd,
|
|
|
|
position: [number, number] | null,
|
|
|
|
anchor: string | null);
|
2018-05-17 07:33:50 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-10-20 13:44:44 -04:00
|
|
|
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
|
|
|
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult;
|
|
|
|
|
|
|
|
export declare type UrlMatchResult = {
|
|
|
|
consumed: UrlSegment[];
|
|
|
|
posParams?: {
|
|
|
|
[name: string]: UrlSegment;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-07-25 15:15:07 -04:00
|
|
|
export declare class UrlSegment {
|
2019-11-09 13:36:22 -05:00
|
|
|
get 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(
|
2018-06-25 05:11:22 -04:00
|
|
|
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
|
|
|
export declare class UrlSegmentGroup {
|
|
|
|
children: {
|
|
|
|
[key: string]: UrlSegmentGroup;
|
|
|
|
};
|
2019-11-09 13:36:22 -05:00
|
|
|
get numberOfChildren(): number;
|
2017-04-17 14:13:13 -04:00
|
|
|
parent: UrlSegmentGroup | null;
|
2016-10-20 13:44:44 -04:00
|
|
|
segments: UrlSegment[];
|
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
segments: UrlSegment[],
|
|
|
|
children: {
|
2016-10-20 13:44:44 -04:00
|
|
|
[key: string]: UrlSegmentGroup;
|
|
|
|
});
|
|
|
|
hasChildren(): boolean;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare abstract class UrlSerializer {
|
|
|
|
abstract parse(url: string): UrlTree;
|
|
|
|
abstract serialize(tree: UrlTree): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export declare class UrlTree {
|
2017-04-17 14:13:13 -04:00
|
|
|
fragment: string | null;
|
2019-11-09 13:36:22 -05:00
|
|
|
get queryParamMap(): ParamMap;
|
2017-10-24 07:54:08 -04:00
|
|
|
queryParams: Params;
|
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
|
|
|
|
|
|
|
export declare const VERSION: Version;
|