docs(router): Make links out of @see tags (#50110)

This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
This commit is contained in:
Matthieu Riegler
2023-05-02 20:30:49 +02:00
committed by Pawel Kozlowski
parent c8c00ae485
commit 9209692bde
12 changed files with 177 additions and 177 deletions
+30 -30
View File
@@ -42,7 +42,7 @@ import {UrlTree} from '../url_tree';
* For instance, suppose the current URL is `/user/(box//aux:team)`.
* The link `<a [routerLink]="['/user/jim']">Jim</a>` creates the URL
* `/user/(jim//aux:team)`.
* See {@link Router#createUrlTree createUrlTree} for more information.
* See {@link Router#createUrlTree} for more information.
*
* @usageNotes
*
@@ -85,7 +85,7 @@ import {UrlTree} from '../url_tree';
* </a>
* ```
*
* See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.
* See {@link UrlCreationOptions#queryParamsHandling}.
*
* ### Preserving navigation history
*
@@ -99,7 +99,7 @@ import {UrlTree} from '../url_tree';
* </a>
* ```
*
* Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved
* Use {@link Router#getCurrentNavigation} to retrieve a saved
* navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`
* event:
*
@@ -133,41 +133,41 @@ export class RouterLink implements OnChanges, OnDestroy {
@HostBinding('attr.target') @Input() target?: string;
/**
* Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
* Passed to {@link Router#createUrlTree} as part of the
* `UrlCreationOptions`.
* @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}
* @see {@link Router#createUrlTree Router#createUrlTree}
* @see {@link UrlCreationOptions#queryParams}
* @see {@link Router#createUrlTree}
*/
@Input() queryParams?: Params|null;
/**
* Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
* Passed to {@link Router#createUrlTree} as part of the
* `UrlCreationOptions`.
* @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}
* @see {@link Router#createUrlTree Router#createUrlTree}
* @see {@link UrlCreationOptions#fragment}
* @see {@link Router#createUrlTree}
*/
@Input() fragment?: string;
/**
* Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
* Passed to {@link Router#createUrlTree} as part of the
* `UrlCreationOptions`.
* @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}
* @see {@link Router#createUrlTree Router#createUrlTree}
* @see {@link UrlCreationOptions#queryParamsHandling}
* @see {@link Router#createUrlTree}
*/
@Input() queryParamsHandling?: QueryParamsHandling|null;
/**
* Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the
* Passed to {@link Router#navigateByUrl} as part of the
* `NavigationBehaviorOptions`.
* @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}
* @see {@link Router#navigateByUrl Router#navigateByUrl}
* @see {@link NavigationBehaviorOptions#state}
* @see {@link Router#navigateByUrl}
*/
@Input() state?: {[k: string]: any};
/**
* Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
* Passed to {@link Router#createUrlTree} as part of the
* `UrlCreationOptions`.
* Specify a value here when you do not want to use the default value
* for `routerLink`, which is the current activated route.
* Note that a value of `undefined` here will use the `routerLink` default.
* @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}
* @see {@link Router#createUrlTree Router#createUrlTree}
* @see {@link UrlCreationOptions#relativeTo}
* @see {@link Router#createUrlTree}
*/
@Input() relativeTo?: ActivatedRoute|null;
@@ -201,26 +201,26 @@ export class RouterLink implements OnChanges, OnDestroy {
}
/**
* Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the
* Passed to {@link Router#createUrlTree} as part of the
* `UrlCreationOptions`.
* @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}
* @see {@link Router#createUrlTree Router#createUrlTree}
* @see {@link UrlCreationOptions#preserveFragment}
* @see {@link Router#createUrlTree}
*/
@Input({transform: booleanAttribute}) preserveFragment: boolean = false;
/**
* Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the
* Passed to {@link Router#navigateByUrl} as part of the
* `NavigationBehaviorOptions`.
* @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}
* @see {@link Router#navigateByUrl Router#navigateByUrl}
* @see {@link NavigationBehaviorOptions#skipLocationChange}
* @see {@link Router#navigateByUrl}
*/
@Input({transform: booleanAttribute}) skipLocationChange: boolean = false;
/**
* Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the
* Passed to {@link Router#navigateByUrl} as part of the
* `NavigationBehaviorOptions`.
* @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}
* @see {@link Router#navigateByUrl Router#navigateByUrl}
* @see {@link NavigationBehaviorOptions#replaceUrl}
* @see {@link Router#navigateByUrl}
*/
@Input({transform: booleanAttribute}) replaceUrl: boolean = false;
@@ -246,11 +246,11 @@ export class RouterLink implements OnChanges, OnDestroy {
}
/**
* Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
* - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
* Commands to pass to {@link Router#createUrlTree}.
* - **array**: commands to pass to {@link Router#createUrlTree}.
* - **string**: shorthand for array of commands with just the string, i.e. `['/route']`
* - **null|undefined**: effectively disables the `routerLink`
* @see {@link Router#createUrlTree Router#createUrlTree}
* @see {@link Router#createUrlTree}
*/
@Input()
set routerLink(commands: any[]|string|null|undefined) {
@@ -27,7 +27,7 @@ import {PRIMARY_OUTLET} from '../shared';
* `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,
* it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.
*
* @see `ChildrenOutletContexts`
* @see {@link ChildrenOutletContexts}
* @publicApi
*/
export interface RouterOutletContract {
@@ -155,8 +155,8 @@ export interface RouterOutletContract {
*
* @see [Routing tutorial](guide/router-tutorial-toh#named-outlets "Example of a named
* outlet and secondary route configuration").
* @see `RouterLink`
* @see `Route`
* @see {@link RouterLink}
* @see {@link Route}
* @ngModule RouterModule
*
* @publicApi
+28 -28
View File
@@ -66,7 +66,7 @@ export const enum EventType {
* }
* ```
*
* @see `Event`
* @see {@link Event}
* @see [Router events summary](guide/router-reference#router-events)
* @publicApi
*/
@@ -90,9 +90,9 @@ export class NavigationStart extends RouterEvent {
* Identifies the call or event that triggered the navigation.
* An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.
*
* @see `NavigationEnd`
* @see `NavigationCancel`
* @see `NavigationError`
* @see {@link NavigationEnd}
* @see {@link NavigationCancel}
* @see {@link NavigationError}
*/
navigationTrigger?: NavigationTrigger;
@@ -138,9 +138,9 @@ export class NavigationStart extends RouterEvent {
/**
* An event triggered when a navigation ends successfully.
*
* @see `NavigationStart`
* @see `NavigationCancel`
* @see `NavigationError`
* @see {@link NavigationStart}
* @see {@link NavigationCancel}
* @see {@link NavigationError}
*
* @publicApi
*/
@@ -204,7 +204,7 @@ export const enum NavigationSkippedCode {
* A navigation was skipped because the configured `UrlHandlingStrategy` return `false` for both
* the current Router URL and the target of the navigation.
*
* @see UrlHandlingStrategy
* @see {@link UrlHandlingStrategy}
*/
IgnoredByUrlHandlingStrategy,
}
@@ -214,9 +214,9 @@ export const enum NavigationSkippedCode {
* This can happen for several reasons including when a route guard
* returns `false` or initiates a redirect by returning a `UrlTree`.
*
* @see `NavigationStart`
* @see `NavigationEnd`
* @see `NavigationError`
* @see {@link NavigationStart}
* @see {@link NavigationEnd}
* @see {@link NavigationError}
*
* @publicApi
*/
@@ -282,9 +282,9 @@ export class NavigationSkipped extends RouterEvent {
/**
* An event triggered when a navigation fails due to an unexpected error.
*
* @see `NavigationStart`
* @see `NavigationEnd`
* @see `NavigationCancel`
* @see {@link NavigationStart}
* @see {@link NavigationEnd}
* @see {@link NavigationCancel}
*
* @publicApi
*/
@@ -344,7 +344,7 @@ export class RoutesRecognized extends RouterEvent {
/**
* An event triggered at the start of the Guard phase of routing.
*
* @see `GuardsCheckEnd`
* @see {@link GuardsCheckEnd}
*
* @publicApi
*/
@@ -372,7 +372,7 @@ export class GuardsCheckStart extends RouterEvent {
/**
* An event triggered at the end of the Guard phase of routing.
*
* @see `GuardsCheckStart`
* @see {@link GuardsCheckStart}
*
* @publicApi
*/
@@ -405,7 +405,7 @@ export class GuardsCheckEnd extends RouterEvent {
* Runs in the "resolve" phase whether or not there is anything to resolve.
* In future, may change to only run when there are things to be resolved.
*
* @see `ResolveEnd`
* @see {@link ResolveEnd}
*
* @publicApi
*/
@@ -432,7 +432,7 @@ export class ResolveStart extends RouterEvent {
/**
* An event triggered at the end of the Resolve phase of routing.
* @see `ResolveStart`.
* @see {@link ResolveStart}.
*
* @publicApi
*/
@@ -460,7 +460,7 @@ export class ResolveEnd extends RouterEvent {
/**
* An event triggered before lazy loading a route configuration.
*
* @see `RouteConfigLoadEnd`
* @see {@link RouteConfigLoadEnd}
*
* @publicApi
*/
@@ -478,7 +478,7 @@ export class RouteConfigLoadStart {
/**
* An event triggered when a route has been lazy loaded.
*
* @see `RouteConfigLoadStart`
* @see {@link RouteConfigLoadStart}
*
* @publicApi
*/
@@ -496,8 +496,8 @@ export class RouteConfigLoadEnd {
/**
* An event triggered at the start of the child-activation
* part of the Resolve phase of routing.
* @see `ChildActivationEnd`
* @see `ResolveStart`
* @see {@link ChildActivationEnd}
* @see {@link ResolveStart}
*
* @publicApi
*/
@@ -516,8 +516,8 @@ export class ChildActivationStart {
/**
* An event triggered at the end of the child-activation part
* of the Resolve phase of routing.
* @see `ChildActivationStart`
* @see `ResolveStart`
* @see {@link ChildActivationStart}
* @see {@link ResolveStart}
* @publicApi
*/
export class ChildActivationEnd {
@@ -535,8 +535,8 @@ export class ChildActivationEnd {
/**
* An event triggered at the start of the activation part
* of the Resolve phase of routing.
* @see `ActivationEnd`
* @see `ResolveStart`
* @see {@link ActivationEnd}
* @see {@link ResolveStart}
*
* @publicApi
*/
@@ -555,8 +555,8 @@ export class ActivationStart {
/**
* An event triggered at the end of the activation part
* of the Resolve phase of routing.
* @see `ActivationStart`
* @see `ResolveStart`
* @see {@link ActivationStart}
* @see {@link ResolveStart}
*
* @publicApi
*/
+42 -42
View File
@@ -31,10 +31,10 @@ import {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';
* (configured by `runGuardsAndResolvers`).
*
* @publicApi
* @see `RouteReuseStrategy`
* @see `RunGuardsAndResolvers`
* @see `NavigationBehaviorOptions`
* @see `RouterConfigOptions`
* @see {@link RouteReuseStrategy}
* @see {@link RunGuardsAndResolvers}
* @see {@link NavigationBehaviorOptions}
* @see {@link RouterConfigOptions}
*/
export type OnSameUrlNavigation = 'reload'|'ignore';
@@ -45,13 +45,13 @@ export type OnSameUrlNavigation = 'reload'|'ignore';
* using `inject`: `canActivate: [() => inject(myGuard).canActivate()]`.
*
* @deprecated
* @see `CanMatchFn`
* @see `CanLoadFn`
* @see `CanActivateFn`
* @see `CanActivateChildFn`
* @see `CanDeactivateFn`
* @see `ResolveFn`
* @see `inject`
* @see {@link CanMatchFn}
* @see {@link CanLoadFn}
* @see {@link CanActivateFn}
* @see {@link CanActivateChildFn}
* @see {@link CanDeactivateFn}
* @see {@link ResolveFn}
* @see {@link core/inject}
* @publicApi
*/
export type DeprecatedGuard = ProviderToken<any>|any;
@@ -61,8 +61,8 @@ export type DeprecatedGuard = ProviderToken<any>|any;
* An array of `Route` objects, used in `Router.config` and for nested route configurations
* in `Route.children`.
*
* @see `Route`
* @see `Router`
* @see {@link Route}
* @see {@link Router}
* @see [Router configuration guide](guide/router-reference#configuration)
* @publicApi
*/
@@ -74,7 +74,7 @@ export type Routes = Route[];
* * `consumed` is an array of the consumed URL segments.
* * `posParams` is a map of positional parameters.
*
* @see `UrlMatcher()`
* @see {@link UrlMatcher}
* @publicApi
*/
export type UrlMatchResult = {
@@ -111,7 +111,7 @@ export type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route:
*
* Represents static data associated with a particular route.
*
* @see `Route#data`
* @see {@link Route#data}
*
* @publicApi
*/
@@ -123,7 +123,7 @@ export type Data = {
*
* Represents the resolved data associated with a particular route.
*
* @see `Route#resolve`.
* @see {@link Route#resolve}.
*
* @publicApi
*/
@@ -134,8 +134,8 @@ export type ResolveData = {
/**
* An ES Module object with a default export of the given type.
*
* @see `Route#loadComponent`
* @see `LoadChildrenCallback`
* @see {@link Route#loadComponent}
* @see {@link LoadChildrenCallback}
*
* @publicApi
*/
@@ -179,7 +179,7 @@ export interface DefaultExport<T> {
* }];
* ```
*
* @see [Route.loadChildren](api/router/Route#loadChildren)
* @see {@link Route#loadChildren}
* @publicApi
*/
export type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Routes|
@@ -190,7 +190,7 @@ export type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Routes|
*
* A function that returns a set of routes to load.
*
* @see `LoadChildrenCallback`
* @see {@link LoadChildrenCallback}
* @publicApi
*/
export type LoadChildren = LoadChildrenCallback;
@@ -203,8 +203,8 @@ export type LoadChildren = LoadChildrenCallback;
* - `"preserve"` : Preserve current parameters.
* - `""` : Replace current parameters with new parameters. This is the default behavior.
*
* @see `UrlCreationOptions#queryParamsHandling`
* @see `RouterLink`
* @see {@link UrlCreationOptions#queryParamsHandling}
* @see {@link RouterLink}
* @publicApi
*/
export type QueryParamsHandling = 'merge'|'preserve'|'';
@@ -224,7 +224,7 @@ export type QueryParamsHandling = 'merge'|'preserve'|'';
* - `pathParamsOrQueryParamsChange` : Rerun guards and resolvers when the path params
* change or query params have changed. This does not include matrix parameters.
*
* @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)
* @see {@link Route#runGuardsAndResolvers}
* @publicApi
*/
export type RunGuardsAndResolvers =
@@ -461,7 +461,7 @@ export interface Route {
* Used to define a page title for the route. This can be a static string or an `Injectable` that
* implements `Resolve`.
*
* @see `PageTitleStrategy`
* @see {@link TitleStrategy}
*/
title?: string|Type<Resolve<string>>|ResolveFn<string>;
@@ -608,7 +608,7 @@ export interface Route {
* - `pathParamsOrQueryParamsChange` : Rerun guards and resolvers when the path params
* change or query params have changed. This does not include matrix parameters.
*
* @see `RunGuardsAndResolvers`
* @see {@link RunGuardsAndResolvers}
*/
runGuardsAndResolvers?: RunGuardsAndResolvers;
@@ -701,7 +701,7 @@ export interface LoadedRouterConfig {
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
* injectable class can be used as a functional guard using the `inject` function:
* `canActivate: [() => inject(myGuard).canActivate()]`.
* @see `CanActivateFn`
* @see {@link CanActivateFn}
*/
export interface CanActivate {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
@@ -726,7 +726,7 @@ export interface CanActivate {
* {@example router/route_functional_guards.ts region="CanActivateFnInRoute"}
*
* @publicApi
* @see `Route`
* @see {@link Route}
*/
export type CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree;
@@ -791,7 +791,7 @@ export type CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSn
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
* injectable class can be used as a functional guard using the `inject` function:
* `canActivateChild: [() => inject(myGuard).canActivateChild()]`.
* @see `CanActivateChildFn`
* @see {@link CanActivateChildFn}
*/
export interface CanActivateChild {
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot):
@@ -811,7 +811,7 @@ export interface CanActivateChild {
* {@example router/route_functional_guards.ts region="CanActivateChildFn"}
*
* @publicApi
* @see `Route`
* @see {@link Route}
*/
export type CanActivateChildFn = (childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree;
@@ -874,7 +874,7 @@ export type CanActivateChildFn = (childRoute: ActivatedRouteSnapshot, state: Rou
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
* injectable class can be used as a functional guard using the `inject` function:
* `canDeactivate: [() => inject(myGuard).canDeactivate()]`.
* @see `CanDeactivateFn`
* @see {@link CanDeactivateFn}
*/
export interface CanDeactivate<T> {
canDeactivate(
@@ -896,7 +896,7 @@ export interface CanDeactivate<T> {
* {@example router/route_functional_guards.ts region="CanDeactivateFn"}
*
* @publicApi
* @see `Route`
* @see {@link Route}
*/
export type CanDeactivateFn<T> =
(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot,
@@ -966,7 +966,7 @@ export type CanDeactivateFn<T> =
* @deprecated Class-based `Route` guards are deprecated in favor of functional guards. An
* injectable class can be used as a functional guard using the `inject` function:
* `canMatch: [() => inject(myGuard).canMatch()]`.
* @see `CanMatchFn`
* @see {@link CanMatchFn}
*/
export interface CanMatch {
canMatch(route: Route, segments: UrlSegment[]):
@@ -986,7 +986,7 @@ export interface CanMatch {
* {@example router/route_functional_guards.ts region="CanMatchFn"}
*
* @publicApi
* @see `Route`
* @see {@link Route}
*/
export type CanMatchFn = (route: Route, segments: UrlSegment[]) =>
Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree;
@@ -1085,7 +1085,7 @@ export type CanMatchFn = (route: Route, segments: UrlSegment[]) =>
* @deprecated Class-based `Route` resolvers are deprecated in favor of functional resolvers. An
* injectable class can be used as a functional guard using the `inject` function: `resolve:
* {'user': () => inject(UserResolver).resolve()}`.
* @see `ResolveFn`
* @see {@link ResolveFn}
*/
export interface Resolve<T> {
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T>|Promise<T>|T;
@@ -1130,7 +1130,7 @@ export interface Resolve<T> {
* The order of execution is: baseGuard, childGuard, baseDataResolver, childDataResolver.
*
* @publicApi
* @see `Route`
* @see {@link Route}
*/
export type ResolveFn<T> = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
Observable<T>|Promise<T>|T;
@@ -1198,9 +1198,9 @@ export interface CanLoad {
* The signature of a function used as a `canLoad` guard on a `Route`.
*
* @publicApi
* @see `CanLoad`
* @see `Route`
* @see `CanMatchFn`
* @see {@link CanLoad}
* @see {@link Route}
* @see {@link CanMatchFn}
* @deprecated Use `Route.canMatch` and `CanMatchFn` instead
*/
export type CanLoadFn = (route: Route, segments: UrlSegment[]) =>
@@ -1214,8 +1214,8 @@ export type CanLoadFn = (route: Route, segments: UrlSegment[]) =>
* Supply an object containing any of these properties to a `Router` navigation function to
* control how the navigation should be handled.
*
* @see [Router.navigate() method](api/router/Router#navigate)
* @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)
* @see {@link Router#navigate}
* @see {@link Router#navigateByUrl}
* @see [Routing and Navigation guide](guide/router)
*
* @publicApi
@@ -1227,8 +1227,8 @@ export interface NavigationBehaviorOptions {
* This value is a subset of the options available in `OnSameUrlNavigation` and
* will take precedence over the default value set for the `Router`.
*
* @see `OnSameUrlNavigation`
* @see `RouterConfigOptions`
* @see {@link OnSameUrlNavigation}
* @see {@link RouterConfigOptions}
*/
onSameUrlNavigation?: Extract<OnSameUrlNavigation, 'reload'>;
+7 -7
View File
@@ -40,8 +40,8 @@ import {Checks, getAllRouteGuards} from './utils/preactivation';
* Supply an object containing any of these properties to a `Router` navigation function to
* control how the target URL should be constructed.
*
* @see [Router.navigate() method](api/router/Router#navigate)
* @see [Router.createUrlTree() method](api/router/Router#createurltree)
* @see {@link Router#navigate}
* @see {@link Router#createUrlTree}
* @see [Routing and Navigation guide](guide/router)
*
* @publicApi
@@ -148,12 +148,12 @@ export interface UrlCreationOptions {
* Supply an object containing any of these properties to a `Router` navigation function to
* control how the target URL should be constructed or interpreted.
*
* @see [Router.navigate() method](api/router/Router#navigate)
* @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)
* @see [Router.createUrlTree() method](api/router/Router#createurltree)
* @see {@link Router#navigate}
* @see {@link Router#navigateByUrl}
* @see {@link Router#createurltree}
* @see [Routing and Navigation guide](guide/router)
* @see UrlCreationOptions
* @see NavigationBehaviorOptions
* @see {@link UrlCreationOptions}
* @see {@link NavigationBehaviorOptions}
*
* @publicApi
*/
+37 -37
View File
@@ -53,7 +53,7 @@ import {afterNextNavigation} from './utils/navigations';
* );
* ```
*
* @see `RouterFeatures`
* @see {@link RouterFeatures}
*
* @publicApi
* @param routes A set of `Route`s to use for the application routing table.
@@ -130,7 +130,7 @@ const routerIsProvidedDevModeCheck = {
* ```
*
* @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.
* @see `ROUTES`
* @see {@link ROUTES}
* @publicApi
*/
export function provideRoutes(routes: Routes): Provider[] {
@@ -143,8 +143,8 @@ export function provideRoutes(routes: Routes): Provider[] {
/**
* A type alias for providers returned by `withInMemoryScrolling` for use with `provideRouter`.
*
* @see `withInMemoryScrolling`
* @see `provideRouter`
* @see {@link withInMemoryScrolling}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -167,8 +167,8 @@ export type InMemoryScrollingFeature = RouterFeature<RouterFeatureKind.InMemoryS
* );
* ```
*
* @see `provideRouter`
* @see `ViewportScroller`
* @see {@link provideRouter}
* @see {@link ViewportScroller}
*
* @publicApi
* @param options Set of configuration parameters to customize scrolling behavior, see
@@ -244,7 +244,7 @@ const BOOTSTRAP_DONE = new InjectionToken<Subject<void>>(
* before the root component gets created. Use if there is a reason to have more control over when
* the router starts its initial navigation due to some complex initialization logic.
*
* @see `ExtraOptions`
* @see {@link ExtraOptions}
*/
const enum InitialNavigation {
EnabledBlocking,
@@ -260,8 +260,8 @@ const INITIAL_NAVIGATION = new InjectionToken<InitialNavigation>(
* A type alias for providers returned by `withEnabledBlockingInitialNavigation` for use with
* `provideRouter`.
*
* @see `withEnabledBlockingInitialNavigation`
* @see `provideRouter`
* @see {@link withEnabledBlockingInitialNavigation}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -272,9 +272,9 @@ export type EnabledBlockingInitialNavigationFeature =
* A type alias for providers returned by `withEnabledBlockingInitialNavigation` or
* `withDisabledInitialNavigation` functions for use with `provideRouter`.
*
* @see `withEnabledBlockingInitialNavigation`
* @see `withDisabledInitialNavigation`
* @see `provideRouter`
* @see {@link withEnabledBlockingInitialNavigation}
* @see {@link withDisabledInitialNavigation}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -301,7 +301,7 @@ export type InitialNavigationFeature =
* );
* ```
*
* @see `provideRouter`
* @see {@link provideRouter}
*
* @publicApi
* @returns A set of providers for use with `provideRouter`.
@@ -349,8 +349,8 @@ export function withEnabledBlockingInitialNavigation(): EnabledBlockingInitialNa
* A type alias for providers returned by `withDisabledInitialNavigation` for use with
* `provideRouter`.
*
* @see `withDisabledInitialNavigation`
* @see `provideRouter`
* @see {@link withDisabledInitialNavigation}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -377,7 +377,7 @@ export type DisabledInitialNavigationFeature =
* );
* ```
*
* @see `provideRouter`
* @see {@link provideRouter}
*
* @returns A set of providers for use with `provideRouter`.
*
@@ -403,8 +403,8 @@ export function withDisabledInitialNavigation(): DisabledInitialNavigationFeatur
/**
* A type alias for providers returned by `withDebugTracing` for use with `provideRouter`.
*
* @see `withDebugTracing`
* @see `provideRouter`
* @see {@link withDebugTracing}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -428,7 +428,7 @@ export type DebugTracingFeature = RouterFeature<RouterFeatureKind.DebugTracingFe
* );
* ```
*
* @see `provideRouter`
* @see {@link provideRouter}
*
* @returns A set of providers for use with `provideRouter`.
*
@@ -465,8 +465,8 @@ const ROUTER_PRELOADER = new InjectionToken<RouterPreloader>(
* A type alias that represents a feature which enables preloading in Router.
* The type is used to describe the return value of the `withPreloading` function.
*
* @see `withPreloading`
* @see `provideRouter`
* @see {@link withPreloading}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -490,7 +490,7 @@ export type PreloadingFeature = RouterFeature<RouterFeatureKind.PreloadingFeatur
* );
* ```
*
* @see `provideRouter`
* @see {@link provideRouter}
*
* @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that
* should be used.
@@ -509,8 +509,8 @@ export function withPreloading(preloadingStrategy: Type<PreloadingStrategy>): Pr
/**
* A type alias for providers returned by `withRouterConfig` for use with `provideRouter`.
*
* @see `withRouterConfig`
* @see `provideRouter`
* @see {@link withRouterConfig}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -536,7 +536,7 @@ export type RouterConfigurationFeature =
* );
* ```
*
* @see `provideRouter`
* @see {@link provideRouter}
*
* @param options A set of parameters to configure Router, see `RouterConfigOptions` for
* additional information.
@@ -554,8 +554,8 @@ export function withRouterConfig(options: RouterConfigOptions): RouterConfigurat
/**
* A type alias for providers returned by `withHashLocation` for use with `provideRouter`.
*
* @see `withHashLocation`
* @see `provideRouter`
* @see {@link withHashLocation}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -578,8 +578,8 @@ export type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.RouterHa
* );
* ```
*
* @see `provideRouter`
* @see `HashLocationStrategy`
* @see {@link provideRouter}
* @see {@link HashLocationStrategy}
*
* @returns A set of providers for use with `provideRouter`.
*
@@ -595,8 +595,8 @@ export function withHashLocation(): RouterConfigurationFeature {
/**
* A type alias for providers returned by `withNavigationErrorHandler` for use with `provideRouter`.
*
* @see `withNavigationErrorHandler`
* @see `provideRouter`
* @see {@link withNavigationErrorHandler}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -624,9 +624,9 @@ export type NavigationErrorHandlerFeature =
* );
* ```
*
* @see `NavigationError`
* @see `inject`
* @see `EnvironmentInjector#runInContext`
* @see {@link NavigationError}
* @see {@link core/inject}
* @see {@link EnvironmentInjector#runInContext}
*
* @returns A set of providers for use with `provideRouter`.
*
@@ -652,8 +652,8 @@ export function withNavigationErrorHandler(fn: (error: NavigationError) => void)
/**
* A type alias for providers returned by `withComponentInputBinding` for use with `provideRouter`.
*
* @see `withComponentInputBinding`
* @see `provideRouter`
* @see {@link withComponentInputBinding}
* @see {@link provideRouter}
*
* @publicApi
*/
@@ -695,7 +695,7 @@ export function withComponentInputBinding(): ComponentInputBindingFeature {
* See documentation for each symbol to find corresponding function name. See also `provideRouter`
* documentation on how to use those functions.
*
* @see `provideRouter`
* @see {@link provideRouter}
*
* @publicApi
*/
+15 -15
View File
@@ -65,7 +65,7 @@ export const subsetMatchOptions: IsActiveMatchOptions = {
*
* A service that provides navigation among views and URL manipulation capabilities.
*
* @see `Route`.
* @see {@link Route}.
* @see [Routing and Navigation Guide](guide/router).
*
* @ngModule RouterModule
@@ -185,7 +185,7 @@ export class Router {
*
* @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.
* `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.
* @see `withNavigationErrorHandler`
* @see {@link withNavigationErrorHandler}
*/
errorHandler = this.options.errorHandler || defaultErrorHandler;
@@ -197,7 +197,7 @@ export class Router {
*
* @deprecated URI parsing errors should be handled in the `UrlSerializer`.
*
* @see `RouterModule`
* @see {@link RouterModule}
*/
malformedUriErrorHandler =
this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;
@@ -239,9 +239,9 @@ export class Router {
*
*
* @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
* @see `withRouterConfig`
* @see `provideRouter`
* @see `RouterModule`
* @see {@link withRouterConfig}
* @see {@link provideRouter}
* @see {@link RouterModule}
*/
onSameUrlNavigation: OnSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';
@@ -255,9 +255,9 @@ export class Router {
* for all child routes.
*
* @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
* @see `withRouterConfig`
* @see `provideRouter`
* @see `RouterModule`
* @see {@link withRouterConfig}
* @see {@link provideRouter}
* @see {@link RouterModule}
*/
paramsInheritanceStrategy: 'emptyOnly'|'always' =
this.options.paramsInheritanceStrategy || 'emptyOnly';
@@ -270,9 +270,9 @@ export class Router {
* you can show an error message with the URL that failed.
*
* @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
* @see `withRouterConfig`
* @see `provideRouter`
* @see `RouterModule`
* @see {@link withRouterConfig}
* @see {@link provideRouter}
* @see {@link RouterModule}
*/
urlUpdateStrategy: 'deferred'|'eager' = this.options.urlUpdateStrategy || 'deferred';
@@ -298,9 +298,9 @@ export class Router {
* The default value is `replace`.
*
* @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
* @see `withRouterConfig`
* @see `provideRouter`
* @see `RouterModule`
* @see {@link withRouterConfig}
* @see {@link provideRouter}
* @see {@link RouterModule}
*/
canceledNavigationResolution: 'replace'|'computed' =
this.options.canceledNavigationResolution || 'replace';
+3 -3
View File
@@ -39,7 +39,7 @@ export type ErrorHandler = (error: any) => any;
* more control over when the router starts its initial navigation due to some complex
* initialization logic.
*
* @see `forRoot()`
* @see {@link forRoot()}
*
* @publicApi
*/
@@ -79,7 +79,7 @@ export interface RouterConfigOptions {
*
* If unset, the `Router` will use `'ignore'`.
*
* @see `OnSameUrlNavigation`
* @see {@link OnSameUrlNavigation}
*/
onSameUrlNavigation?: OnSameUrlNavigation;
@@ -166,7 +166,7 @@ export interface InMemoryScrollingOptions {
* A set of configuration options for a router module, provided in the
* `forRoot()` method.
*
* @see `forRoot()`
* @see {@link forRoot()}
*
*
* @publicApi
+1 -1
View File
@@ -42,7 +42,7 @@ import {Tree, TreeNode} from './utils/tree';
* }
* ```
*
* @see `ActivatedRoute`
* @see {@link ActivatedRoute}
* @see [Getting route information](guide/router#getting-route-information)
*
* @publicApi
+4 -4
View File
@@ -26,8 +26,8 @@ export const RouteTitleKey = Symbol('RouteTitle');
/**
* A collection of matrix and query URL parameters.
* @see `convertToParamMap()`
* @see `ParamMap`
* @see {@link convertToParamMap}
* @see {@link ParamMap}
*
* @publicApi
*/
@@ -127,8 +127,8 @@ export function convertToParamMap(params: Params): ParamMap {
* @param segmentGroup The current segment group being matched
* @param route The `Route` to match against.
*
* @see UrlMatchResult
* @see Route
* @see {@link UrlMatchResult}
* @see {@link Route}
*
* @returns The resulting match information or `null` if the `route` should not match.
* @publicApi
@@ -17,7 +17,7 @@ import {CanActivateChildFn, CanActivateFn, CanDeactivateFn, CanMatchFn, ResolveF
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see Route
* @see {@link Route}
*/
export function mapToCanMatch(providers: Array<Type<{canMatch: CanMatchFn}>>): CanMatchFn[] {
return providers.map(provider => (...params) => inject(provider).canMatch(...params));
@@ -30,7 +30,7 @@ export function mapToCanMatch(providers: Array<Type<{canMatch: CanMatchFn}>>): C
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see Route
* @see {@link Route}
*/
export function mapToCanActivate(providers: Array<Type<{canActivate: CanActivateFn}>>):
CanActivateFn[] {
@@ -43,7 +43,7 @@ export function mapToCanActivate(providers: Array<Type<{canActivate: CanActivate
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see Route
* @see {@link Route}
*/
export function mapToCanActivateChild(
providers: Array<Type<{canActivateChild: CanActivateChildFn}>>): CanActivateChildFn[] {
@@ -56,7 +56,7 @@ export function mapToCanActivateChild(
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see Route
* @see {@link Route}
*/
export function mapToCanDeactivate<T = unknown>(
providers: Array<Type<{canDeactivate: CanDeactivateFn<T>}>>): CanDeactivateFn<T>[] {
@@ -69,7 +69,7 @@ export function mapToCanDeactivate<T = unknown>(
* Usage {@example router/utils/functional_guards.ts region='Resolve'}
*
* @publicApi
* @see Route
* @see {@link Route}
*/
export function mapToResolve<T>(provider: Type<{resolve: ResolveFn<T>}>): ResolveFn<T> {
return (...params) => inject(provider).resolve(...params);
+2 -2
View File
@@ -57,8 +57,8 @@ export function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {
*
* @param ngUpgrade The upgrade NgModule.
* @param urlType The location strategy.
* @see `HashLocationStrategy`
* @see `PathLocationStrategy`
* @see {@link HashLocationStrategy}
* @see {@link PathLocationStrategy}
*
* @publicApi
*/