docs: update router to use @publicApi tags (#26595)

PR Close #26595
This commit is contained in:
Pete Bacon Darwin 2018-10-19 18:25:11 +01:00 committed by Alex Rickabaugh
parent c1724062f1
commit 13143b850e
20 changed files with 67 additions and 65 deletions

View File

@ -253,6 +253,7 @@ import {UrlSegment, UrlSegmentGroup} from './url_tree';
* Then it will extract the set of routes defined in that NgModule, and will transparently add * Then it will extract the set of routes defined in that NgModule, and will transparently add
* those routes to the main configuration. * those routes to the main configuration.
* *
* @publicApi
*/ */
export type Routes = Route[]; export type Routes = Route[];
@ -298,6 +299,7 @@ export type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route:
* *
* See `Routes` for more details. * See `Routes` for more details.
* *
* @publicApi
*/ */
export type Data = { export type Data = {
[name: string]: any [name: string]: any
@ -310,6 +312,7 @@ export type Data = {
* *
* See `Routes` for more details. * See `Routes` for more details.
* *
* @publicApi
*/ */
export type ResolveData = { export type ResolveData = {
[name: string]: any [name: string]: any
@ -322,6 +325,7 @@ export type ResolveData = {
* *
* See `Routes` for more details. * See `Routes` for more details.
* *
* @publicApi
*/ */
export type LoadChildrenCallback = () => export type LoadChildrenCallback = () =>
Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>; Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;
@ -333,6 +337,7 @@ export type LoadChildrenCallback = () =>
* *
* See `Routes` for more details. * See `Routes` for more details.
* *
* @publicApi
*/ */
export type LoadChildren = string | LoadChildrenCallback; export type LoadChildren = string | LoadChildrenCallback;
@ -359,6 +364,7 @@ export type RunGuardsAndResolvers = 'paramsChange' | 'paramsOrQueryParamsChange'
/** /**
* See `Routes` for more details. * See `Routes` for more details.
* *
* @publicApi
*/ */
export interface Route { export interface Route {
path?: string; path?: string;

View File

@ -88,7 +88,7 @@ import {UrlTree} from '../url_tree';
* *
* @ngModule RouterModule * @ngModule RouterModule
* *
* * @publicApi
*/ */
@Directive({selector: ':not(a)[routerLink]'}) @Directive({selector: ':not(a)[routerLink]'})
export class RouterLink { export class RouterLink {
@ -167,7 +167,7 @@ export class RouterLink {
* *
* @ngModule RouterModule * @ngModule RouterModule
* *
* * @publicApi
*/ */
@Directive({selector: 'a[routerLink]'}) @Directive({selector: 'a[routerLink]'})
export class RouterLinkWithHref implements OnChanges, OnDestroy { export class RouterLinkWithHref implements OnChanges, OnDestroy {

View File

@ -70,7 +70,7 @@ import {RouterLink, RouterLinkWithHref} from './router_link';
* *
* @ngModule RouterModule * @ngModule RouterModule
* *
* * @publicApi
*/ */
@Directive({ @Directive({
selector: '[routerLinkActive]', selector: '[routerLinkActive]',

View File

@ -34,7 +34,7 @@ import {PRIMARY_OUTLET} from '../shared';
* ``` * ```
* @ngModule RouterModule * @ngModule RouterModule
* *
* * @publicApi
*/ */
@Directive({selector: 'router-outlet', exportAs: 'outlet'}) @Directive({selector: 'router-outlet', exportAs: 'outlet'})
export class RouterOutlet implements OnDestroy, OnInit { export class RouterOutlet implements OnDestroy, OnInit {

View File

@ -55,7 +55,7 @@ export class RouterEvent {
* *
* Represents an event triggered when a navigation starts. * Represents an event triggered when a navigation starts.
* *
* * @publicApi
*/ */
export class NavigationStart extends RouterEvent { export class NavigationStart extends RouterEvent {
/** /**
@ -104,7 +104,7 @@ export class NavigationStart extends RouterEvent {
* *
* Represents an event triggered when a navigation ends successfully. * Represents an event triggered when a navigation ends successfully.
* *
* * @publicApi
*/ */
export class NavigationEnd extends RouterEvent { export class NavigationEnd extends RouterEvent {
constructor( constructor(
@ -128,7 +128,7 @@ export class NavigationEnd extends RouterEvent {
* *
* Represents an event triggered when a navigation is canceled. * Represents an event triggered when a navigation is canceled.
* *
* * @publicApi
*/ */
export class NavigationCancel extends RouterEvent { export class NavigationCancel extends RouterEvent {
constructor( constructor(
@ -150,7 +150,7 @@ export class NavigationCancel extends RouterEvent {
* *
* Represents an event triggered when a navigation fails due to an unexpected error. * Represents an event triggered when a navigation fails due to an unexpected error.
* *
* * @publicApi
*/ */
export class NavigationError extends RouterEvent { export class NavigationError extends RouterEvent {
constructor( constructor(
@ -174,7 +174,7 @@ export class NavigationError extends RouterEvent {
* *
* Represents an event triggered when routes are recognized. * Represents an event triggered when routes are recognized.
* *
* * @publicApi
*/ */
export class RoutesRecognized extends RouterEvent { export class RoutesRecognized extends RouterEvent {
constructor( constructor(
@ -405,6 +405,8 @@ export class ActivationEnd {
* @description * @description
* *
* Represents a scrolling event. * Represents a scrolling event.
*
* @publicApi
*/ */
export class Scroll { export class Scroll {
constructor( constructor(
@ -447,7 +449,7 @@ export class Scroll {
* - `NavigationError` * - `NavigationError`
* - `Scroll` * - `Scroll`
* *
* * @publicApi
*/ */
export type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | export type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |
ChildActivationEnd | ActivationStart | ActivationEnd | Scroll; ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;

View File

@ -76,7 +76,7 @@ import {UrlSegment} from './url_tree';
* class AppModule {} * class AppModule {}
* ``` * ```
* *
* * @publicApi
*/ */
export interface CanActivate { export interface CanActivate {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
@ -156,7 +156,7 @@ export interface CanActivate {
* class AppModule {} * class AppModule {}
* ``` * ```
* *
* * @publicApi
*/ */
export interface CanActivateChild { export interface CanActivateChild {
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot):
@ -229,7 +229,7 @@ export interface CanActivateChild {
* class AppModule {} * class AppModule {}
* ``` * ```
* *
* * @publicApi
*/ */
export interface CanDeactivate<T> { export interface CanDeactivate<T> {
canDeactivate( canDeactivate(
@ -303,6 +303,7 @@ export interface CanDeactivate<T> {
* class AppModule {} * class AppModule {}
* ``` * ```
* *
* @publicApi
*/ */
export interface Resolve<T> { export interface Resolve<T> {
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T>|Promise<T>|T; resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T>|Promise<T>|T;
@ -371,7 +372,7 @@ export interface Resolve<T> {
* class AppModule {} * class AppModule {}
* ``` * ```
* *
* * @publicApi
*/ */
export interface CanLoad { export interface CanLoad {
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>|Promise<boolean>|boolean; canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>|Promise<boolean>|boolean;

View File

@ -37,7 +37,7 @@ import {Checks, getAllRouteGuards} from './utils/preactivation';
* *
* Represents the extra options used during navigation. * Represents the extra options used during navigation.
* *
* * @publicApi
*/ */
export interface NavigationExtras { export interface NavigationExtras {
/** /**
@ -155,7 +155,7 @@ export interface NavigationExtras {
* If the handler throws an exception, the navigation promise will be rejected with * If the handler throws an exception, the navigation promise will be rejected with
* the exception. * the exception.
* *
* * @publicApi
*/ */
export type ErrorHandler = (error: any) => any; export type ErrorHandler = (error: any) => any;
@ -222,7 +222,7 @@ function defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {
* *
* @ngModule RouterModule * @ngModule RouterModule
* *
* * @publicApi
*/ */
export class Router { export class Router {
private currentUrlTree: UrlTree; private currentUrlTree: UrlTree;

View File

@ -45,7 +45,7 @@ const ROUTER_DIRECTIVES =
* *
* Is used in DI to configure the router. * Is used in DI to configure the router.
* *
* * @publicApi
*/ */
export const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION'); export const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');
@ -128,7 +128,7 @@ export function routerNgProbeToken() {
* [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an
* overview of how the router should be used. * overview of how the router should be used.
* *
* * @publicApi
*/ */
@NgModule({ @NgModule({
declarations: ROUTER_DIRECTIVES, declarations: ROUTER_DIRECTIVES,
@ -236,7 +236,7 @@ export function provideForRootGuard(router: Router): any {
* class MyNgModule {} * class MyNgModule {}
* ``` * ```
* *
* * @publicApi
*/ */
export function provideRoutes(routes: Routes): any { export function provideRoutes(routes: Routes): any {
return [ return [
@ -278,7 +278,7 @@ export type InitialNavigation =
* *
* Represents options to configure the router. * Represents options to configure the router.
* *
* * @publicApi
*/ */
export interface ExtraOptions { export interface ExtraOptions {
/** /**

View File

@ -15,7 +15,7 @@ import {ActivatedRoute} from './router_state';
/** /**
* Store contextual information about a `RouterOutlet` * Store contextual information about a `RouterOutlet`
* *
* * @publicApi
*/ */
export class OutletContext { export class OutletContext {
outlet: RouterOutlet|null = null; outlet: RouterOutlet|null = null;
@ -28,7 +28,7 @@ export class OutletContext {
/** /**
* Store contextual information about the children (= nested) `RouterOutlet` * Store contextual information about the children (= nested) `RouterOutlet`
* *
* * @publicApi
*/ */
export class ChildrenOutletContexts { export class ChildrenOutletContexts {
// contexts for child outlets, by name. // contexts for child outlets, by name.

View File

@ -67,7 +67,7 @@ export class NoPreloading implements PreloadingStrategy {
* *
* If a route is protected by `canLoad` guards, the preloaded will not load it. * If a route is protected by `canLoad` guards, the preloaded will not load it.
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class RouterPreloader implements OnDestroy { export class RouterPreloader implements OnDestroy {

View File

@ -44,7 +44,7 @@ import {Tree, TreeNode} from './utils/tree';
* *
* See `ActivatedRoute` for more information. * See `ActivatedRoute` for more information.
* *
* * @publicApi
*/ */
export class RouterState extends Tree<ActivatedRoute> { export class RouterState extends Tree<ActivatedRoute> {
/** @internal */ /** @internal */
@ -103,7 +103,7 @@ export function createEmptyStateSnapshot(
* } * }
* ``` * ```
* *
* * @publicApi
*/ */
export class ActivatedRoute { export class ActivatedRoute {
/** The current snapshot of this route */ /** The current snapshot of this route */
@ -250,7 +250,7 @@ function flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {
* } * }
* ``` * ```
* *
* * @publicApi
*/ */
export class ActivatedRouteSnapshot { export class ActivatedRouteSnapshot {
/** The configuration used to match this route **/ /** The configuration used to match this route **/
@ -358,7 +358,7 @@ export class ActivatedRouteSnapshot {
* } * }
* ``` * ```
* *
* * @publicApi
*/ */
export class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> { export class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
/** @internal */ /** @internal */

View File

@ -15,14 +15,14 @@ import {UrlSegment, UrlSegmentGroup} from './url_tree';
* *
* Name of the primary outlet. * Name of the primary outlet.
* *
* * @publicApi
*/ */
export const PRIMARY_OUTLET = 'primary'; export const PRIMARY_OUTLET = 'primary';
/** /**
* A collection of parameters. * A collection of parameters.
* *
* * @publicApi
*/ */
export type Params = { export type Params = {
[key: string]: any [key: string]: any
@ -38,7 +38,7 @@ export type Params = {
* The API is inspired by the URLSearchParams interface. * The API is inspired by the URLSearchParams interface.
* see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
* *
* * @publicApi
*/ */
export interface ParamMap { export interface ParamMap {
has(name: string): boolean; has(name: string): boolean;
@ -91,7 +91,7 @@ class ParamsAsMap implements ParamMap {
/** /**
* Convert a `Params` instance to a `ParamMap`. * Convert a `Params` instance to a `ParamMap`.
* *
* * @publicApi
*/ */
export function convertToParamMap(params: Params): ParamMap { export function convertToParamMap(params: Params): ParamMap {
return new ParamsAsMap(params); return new ParamsAsMap(params);

View File

@ -101,7 +101,7 @@ function containsSegmentGroupHelper(
* } * }
* ``` * ```
* *
* * @publicApi
*/ */
export class UrlTree { export class UrlTree {
/** @internal */ /** @internal */
@ -135,7 +135,7 @@ export class UrlTree {
* *
* See `UrlTree` for more information. * See `UrlTree` for more information.
* *
* * @publicApi
*/ */
export class UrlSegmentGroup { export class UrlSegmentGroup {
/** @internal */ /** @internal */
@ -190,7 +190,7 @@ export class UrlSegmentGroup {
* } * }
* ``` * ```
* *
* * @publicApi
*/ */
export class UrlSegment { export class UrlSegment {
/** @internal */ /** @internal */
@ -251,7 +251,7 @@ export function mapChildrenIntoArray<T>(
* *
* See `DefaultUrlSerializer` for an example of a URL serializer. * See `DefaultUrlSerializer` for an example of a URL serializer.
* *
* * @publicApi
*/ */
export abstract class UrlSerializer { export abstract class UrlSerializer {
/** Parse a url into a `UrlTree` */ /** Parse a url into a `UrlTree` */
@ -277,7 +277,7 @@ export abstract class UrlSerializer {
* colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to
* specify route specific parameters. * specify route specific parameters.
* *
* * @publicApi
*/ */
export class DefaultUrlSerializer implements UrlSerializer { export class DefaultUrlSerializer implements UrlSerializer {
/** Parses a url into a `UrlTree` */ /** Parses a url into a `UrlTree` */

View File

@ -14,4 +14,7 @@
import {Version} from '@angular/core'; import {Version} from '@angular/core';
/**
* @publicApi
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER'); export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -40,7 +40,7 @@ import {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy,
* router.navigateByUrl('/lazy/loaded'); * router.navigateByUrl('/lazy/loaded');
* ``` * ```
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader { export class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {
@ -86,7 +86,7 @@ function isUrlHandlingStrategy(opts: ExtraOptions | UrlHandlingStrategy):
/** /**
* Router setup factory function used for testing. * Router setup factory function used for testing.
* *
* * @publicApi
*/ */
export function setupTestingRouter( export function setupTestingRouter(
urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,
@ -98,6 +98,7 @@ export function setupTestingRouter(
* *
* @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not * @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not
* `UrlHandlingStrategy` * `UrlHandlingStrategy`
* @publicApi
*/ */
export function setupTestingRouter( export function setupTestingRouter(
urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,
@ -107,7 +108,7 @@ export function setupTestingRouter(
/** /**
* Router setup factory function used for testing. * Router setup factory function used for testing.
* *
* * @publicApi
*/ */
export function setupTestingRouter( export function setupTestingRouter(
urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,
@ -162,7 +163,7 @@ export function setupTestingRouter(
* }); * });
* ``` * ```
* *
* * @publicApi
*/ */
@NgModule({ @NgModule({
exports: [RouterModule], exports: [RouterModule],

View File

@ -251,6 +251,8 @@ try {
/** /**
* @deprecated Use `setAngularJSGlobal` instead. * @deprecated Use `setAngularJSGlobal` instead.
*
* @publicApi
*/ */
export function setAngularLib(ng: any): void { export function setAngularLib(ng: any): void {
setAngularJSGlobal(ng); setAngularJSGlobal(ng);
@ -258,6 +260,8 @@ export function setAngularLib(ng: any): void {
/** /**
* @deprecated Use `getAngularJSGlobal` instead. * @deprecated Use `getAngularJSGlobal` instead.
*
* @publicApi
*/ */
export function getAngularLib(): any { export function getAngularLib(): any {
return getAngularJSGlobal(); return getAngularJSGlobal();
@ -267,6 +271,8 @@ export function getAngularLib(): any {
* Resets the AngularJS global. * Resets the AngularJS global.
* *
* Used when AngularJS is loaded lazily, and not available on `window`. * Used when AngularJS is loaded lazily, and not available on `window`.
*
* @publicApi
*/ */
export function setAngularJSGlobal(ng: any): void { export function setAngularJSGlobal(ng: any): void {
angular = ng; angular = ng;
@ -275,6 +281,8 @@ export function setAngularJSGlobal(ng: any): void {
/** /**
* Returns the current AngularJS global. * Returns the current AngularJS global.
*
* @publicApi
*/ */
export function getAngularJSGlobal(): any { export function getAngularJSGlobal(): any {
return angular; return angular;

View File

@ -14,4 +14,7 @@
import {Version} from '@angular/core'; import {Version} from '@angular/core';
/**
* @publicApi
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER'); export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -99,6 +99,7 @@ let upgradeCount: number = 0;
* *
* @deprecated Deprecated since v5. Use `upgrade/static` instead, which also supports * @deprecated Deprecated since v5. Use `upgrade/static` instead, which also supports
* [Ahead-of-Time compilation](guide/aot-compiler). * [Ahead-of-Time compilation](guide/aot-compiler).
* @publicApi
*/ */
export class UpgradeAdapter { export class UpgradeAdapter {
private idPrefix: string = `NG2_UPGRADE_${upgradeCount++}_`; private idPrefix: string = `NG2_UPGRADE_${upgradeCount++}_`;
@ -655,6 +656,7 @@ class ParentInjectorPromise {
* *
* @deprecated Deprecated since v5. Use `upgrade/static` instead, which also supports * @deprecated Deprecated since v5. Use `upgrade/static` instead, which also supports
* [Ahead-of-Time compilation](guide/aot-compiler). * [Ahead-of-Time compilation](guide/aot-compiler).
* @publicApi
*/ */
export class UpgradeAdapterRef { export class UpgradeAdapterRef {
/* @internal */ /* @internal */

View File

@ -37,7 +37,6 @@ export declare class ActivatedRouteSnapshot {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class ActivationEnd { export declare class ActivationEnd {
snapshot: ActivatedRouteSnapshot; snapshot: ActivatedRouteSnapshot;
constructor( constructor(
@ -45,7 +44,6 @@ export declare class ActivationEnd {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class ActivationStart { export declare class ActivationStart {
snapshot: ActivatedRouteSnapshot; snapshot: ActivatedRouteSnapshot;
constructor( constructor(
@ -69,7 +67,6 @@ export interface CanLoad {
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean; canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean;
} }
/** @experimental */
export declare class ChildActivationEnd { export declare class ChildActivationEnd {
snapshot: ActivatedRouteSnapshot; snapshot: ActivatedRouteSnapshot;
constructor( constructor(
@ -77,7 +74,6 @@ export declare class ChildActivationEnd {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class ChildActivationStart { export declare class ChildActivationStart {
snapshot: ActivatedRouteSnapshot; snapshot: ActivatedRouteSnapshot;
constructor( constructor(
@ -105,7 +101,6 @@ export declare class DefaultUrlSerializer implements UrlSerializer {
serialize(tree: UrlTree): string; serialize(tree: UrlTree): string;
} }
/** @experimental */
export declare type DetachedRouteHandle = {}; export declare type DetachedRouteHandle = {};
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll; export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;
@ -126,7 +121,6 @@ export interface ExtraOptions {
useHash?: boolean; useHash?: boolean;
} }
/** @experimental */
export declare class GuardsCheckEnd extends RouterEvent { export declare class GuardsCheckEnd extends RouterEvent {
shouldActivate: boolean; shouldActivate: boolean;
state: RouterStateSnapshot; state: RouterStateSnapshot;
@ -140,7 +134,6 @@ export declare class GuardsCheckEnd extends RouterEvent {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class GuardsCheckStart extends RouterEvent { export declare class GuardsCheckStart extends RouterEvent {
state: RouterStateSnapshot; state: RouterStateSnapshot;
urlAfterRedirects: string; urlAfterRedirects: string;
@ -209,7 +202,6 @@ export declare class NavigationStart extends RouterEvent {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class NoPreloading implements PreloadingStrategy { export declare class NoPreloading implements PreloadingStrategy {
preload(route: Route, fn: () => Observable<any>): Observable<any>; preload(route: Route, fn: () => Observable<any>): Observable<any>;
} }
@ -233,12 +225,10 @@ export declare type Params = {
[key: string]: any; [key: string]: any;
}; };
/** @experimental */
export declare class PreloadAllModules implements PreloadingStrategy { export declare class PreloadAllModules implements PreloadingStrategy {
preload(route: Route, fn: () => Observable<any>): Observable<any>; preload(route: Route, fn: () => Observable<any>): Observable<any>;
} }
/** @experimental */
export declare abstract class PreloadingStrategy { export declare abstract class PreloadingStrategy {
abstract preload(route: Route, fn: () => Observable<any>): Observable<any>; abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;
} }
@ -255,7 +245,6 @@ export declare type ResolveData = {
[name: string]: any; [name: string]: any;
}; };
/** @experimental */
export declare class ResolveEnd extends RouterEvent { export declare class ResolveEnd extends RouterEvent {
state: RouterStateSnapshot; state: RouterStateSnapshot;
urlAfterRedirects: string; urlAfterRedirects: string;
@ -267,7 +256,6 @@ export declare class ResolveEnd extends RouterEvent {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class ResolveStart extends RouterEvent { export declare class ResolveStart extends RouterEvent {
state: RouterStateSnapshot; state: RouterStateSnapshot;
urlAfterRedirects: string; urlAfterRedirects: string;
@ -297,7 +285,6 @@ export interface Route {
runGuardsAndResolvers?: RunGuardsAndResolvers; runGuardsAndResolvers?: RunGuardsAndResolvers;
} }
/** @experimental */
export declare class RouteConfigLoadEnd { export declare class RouteConfigLoadEnd {
route: Route; route: Route;
constructor( constructor(
@ -305,7 +292,6 @@ export declare class RouteConfigLoadEnd {
toString(): string; toString(): string;
} }
/** @experimental */
export declare class RouteConfigLoadStart { export declare class RouteConfigLoadStart {
route: Route; route: Route;
constructor( constructor(
@ -343,10 +329,8 @@ export declare class Router {
export declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>; export declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;
/** @experimental */
export declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<any>) => void>; export declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<any>) => void>;
/** @experimental */
export declare abstract class RouteReuseStrategy { export declare abstract class RouteReuseStrategy {
abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null; abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;
abstract shouldAttach(route: ActivatedRouteSnapshot): boolean; abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;
@ -355,7 +339,6 @@ export declare abstract class RouteReuseStrategy {
abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void; abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;
} }
/** @experimental */
export declare class RouterEvent { export declare class RouterEvent {
id: number; id: number;
url: string; url: string;
@ -455,7 +438,6 @@ export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
export declare type Routes = Route[]; export declare type Routes = Route[];
/** @experimental */
export declare const ROUTES: InjectionToken<Route[][]>; export declare const ROUTES: InjectionToken<Route[][]>;
export declare class RoutesRecognized extends RouterEvent { export declare class RoutesRecognized extends RouterEvent {
@ -469,7 +451,6 @@ export declare class RoutesRecognized extends RouterEvent {
toString(): string; toString(): string;
} }
/** @experimental */
export declare type RunGuardsAndResolvers = 'paramsChange' | 'paramsOrQueryParamsChange' | 'always'; export declare type RunGuardsAndResolvers = 'paramsChange' | 'paramsOrQueryParamsChange' | 'always';
export declare class Scroll { export declare class Scroll {
@ -483,17 +464,14 @@ export declare class Scroll {
toString(): string; toString(): string;
} }
/** @experimental */
export declare abstract class UrlHandlingStrategy { export declare abstract class UrlHandlingStrategy {
abstract extract(url: UrlTree): UrlTree; abstract extract(url: UrlTree): UrlTree;
abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree; abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;
abstract shouldProcessUrl(url: UrlTree): boolean; abstract shouldProcessUrl(url: UrlTree): boolean;
} }
/** @experimental */
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult; export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult;
/** @experimental */
export declare type UrlMatchResult = { export declare type UrlMatchResult = {
consumed: UrlSegment[]; consumed: UrlSegment[];
posParams?: { posParams?: {

View File

@ -1,4 +1,3 @@
/** @experimental */
export declare const RouterUpgradeInitializer: { export declare const RouterUpgradeInitializer: {
provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>; provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
multi: boolean; multi: boolean;
@ -6,5 +5,4 @@ export declare const RouterUpgradeInitializer: {
deps: (typeof UpgradeModule)[]; deps: (typeof UpgradeModule)[];
}; };
/** @experimental */
export declare function setUpLocationSync(ngUpgrade: UpgradeModule): void; export declare function setUpLocationSync(ngUpgrade: UpgradeModule): void;