From 9141424ac69f8ff9702485e7f00e58fa503d8c42 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 5 Apr 2018 11:53:57 +0100 Subject: [PATCH] docs(router): remove unnecessary `{@link Injector}` jsdoc tags (#23187) Inline code blocks are automatically linked, if possible, to their API page. PR Close #23187 --- packages/router/src/config.ts | 26 ++++++------ packages/router/src/directives/router_link.ts | 2 +- packages/router/src/events.ts | 40 +++++++++---------- packages/router/src/router.ts | 8 ++-- packages/router/src/router_module.ts | 8 ++-- packages/router/src/router_outlet_context.ts | 4 +- packages/router/src/router_state.ts | 2 +- packages/router/src/shared.ts | 2 +- packages/router/src/url_tree.ts | 16 ++++---- .../testing/src/router_testing_module.ts | 2 +- 10 files changed, 55 insertions(+), 55 deletions(-) diff --git a/packages/router/src/config.ts b/packages/router/src/config.ts index b4ed625587..3c2e82f29b 100644 --- a/packages/router/src/config.ts +++ b/packages/router/src/config.ts @@ -25,21 +25,21 @@ import {UrlSegment, UrlSegmentGroup} from './url_tree'; * - `redirectTo` is the url fragment which will replace the current matched segment. * - `outlet` is the name of the outlet the component should be placed into. * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See - * {@link CanActivate} for more info. + * `CanActivate` for more info. * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See - * {@link CanActivateChild} for more info. + * `CanActivateChild` for more info. * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See - * {@link CanDeactivate} for more info. + * `CanDeactivate` for more info. * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See - * {@link CanLoad} for more info. + * `CanLoad` for more info. * - `data` is additional data provided to the component via `ActivatedRoute`. - * - `resolve` is a map of DI tokens used to look up data resolvers. See {@link Resolve} for more + * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more * info. * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only * when the matrix parameters of the route change. When set to `paramsOrQueryParamsChange` they * will also run when query params change. And when set to `always`, they will run every time. * - `children` is an array of child route definitions. - * - `loadChildren` is a reference to lazy loaded child routes. See {@link LoadChildren} for more + * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more * info. * * ### Simple Configuration @@ -295,7 +295,7 @@ export type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: * * Represents the static data associated with a particular route. * - * See {@link Routes} for more details. + * See `Routes` for more details. * @stable */ export type Data = { @@ -307,7 +307,7 @@ export type Data = { * * Represents the resolved data associated with a particular route. * - * See {@link Routes} for more details. + * See `Routes` for more details. * @stable */ export type ResolveData = { @@ -319,7 +319,7 @@ export type ResolveData = { * * The type of `loadChildren`. * - * See {@link Routes} for more details. + * See `Routes` for more details. * @stable */ export type LoadChildrenCallback = () => @@ -330,7 +330,7 @@ export type LoadChildrenCallback = () => * * The type of `loadChildren`. * - * See {@link Routes} for more details. + * See `Routes` for more details. * @stable */ export type LoadChildren = string | LoadChildrenCallback; @@ -340,7 +340,7 @@ export type LoadChildren = string | LoadChildrenCallback; * * The type of `queryParamsHandling`. * - * See {@link RouterLink} for more details. + * See `RouterLink` for more details. * @stable */ export type QueryParamsHandling = 'merge' | 'preserve' | ''; @@ -350,13 +350,13 @@ export type QueryParamsHandling = 'merge' | 'preserve' | ''; * * The type of `runGuardsAndResolvers`. * - * See {@link Routes} for more details. + * See `Routes` for more details. * @experimental */ export type RunGuardsAndResolvers = 'paramsChange' | 'paramsOrQueryParamsChange' | 'always'; /** - * See {@link Routes} for more details. + * See `Routes` for more details. * @stable */ export interface Route { diff --git a/packages/router/src/directives/router_link.ts b/packages/router/src/directives/router_link.ts index ed9472c1ca..9529e97c0b 100644 --- a/packages/router/src/directives/router_link.ts +++ b/packages/router/src/directives/router_link.ts @@ -156,7 +156,7 @@ export class RouterLink { * * Lets you link to specific routes in your app. * - * See {@link RouterLink} for more information. + * See `RouterLink` for more information. * * @ngModule RouterModule * diff --git a/packages/router/src/events.ts b/packages/router/src/events.ts index 887efa455d..3c0ecaea42 100644 --- a/packages/router/src/events.ts +++ b/packages/router/src/events.ts @@ -279,7 +279,7 @@ export class ResolveStart extends RouterEvent { * @description * * Represents the end of the Resolve phase of routing. See note on - * {@link ResolveStart} for use of this experimental API. + * `ResolveStart` for use of this experimental API. * * @experimental */ @@ -333,7 +333,7 @@ export class RouteConfigLoadEnd { * @description * * Represents the start of end of the Resolve phase of routing. See note on - * {@link ChildActivationEnd} for use of this experimental API. + * `ChildActivationEnd` for use of this experimental API. * * @experimental */ @@ -351,7 +351,7 @@ export class ChildActivationStart { * @description * * Represents the start of end of the Resolve phase of routing. See note on - * {@link ChildActivationStart} for use of this experimental API. + * `ChildActivationStart` for use of this experimental API. * * @experimental */ @@ -369,7 +369,7 @@ export class ChildActivationEnd { * @description * * Represents the start of end of the Resolve phase of routing. See note on - * {@link ActivationEnd} for use of this experimental API. + * `ActivationEnd` for use of this experimental API. * * @experimental */ @@ -387,7 +387,7 @@ export class ActivationStart { * @description * * Represents the start of end of the Resolve phase of routing. See note on - * {@link ActivationStart} for use of this experimental API. + * `ActivationStart` for use of this experimental API. * * @experimental */ @@ -408,21 +408,21 @@ export class ActivationEnd { * * The sequence of router events is: * - * - {@link NavigationStart}, - * - {@link RouteConfigLoadStart}, - * - {@link RouteConfigLoadEnd}, - * - {@link RoutesRecognized}, - * - {@link GuardsCheckStart}, - * - {@link ChildActivationStart}, - * - {@link ActivationStart}, - * - {@link GuardsCheckEnd}, - * - {@link ResolveStart}, - * - {@link ResolveEnd}, - * - {@link ActivationEnd} - * - {@link ChildActivationEnd} - * - {@link NavigationEnd}, - * - {@link NavigationCancel}, - * - {@link NavigationError} + * - `NavigationStart`, + * - `RouteConfigLoadStart`, + * - `RouteConfigLoadEnd`, + * - `RoutesRecognized`, + * - `GuardsCheckStart`, + * - `ChildActivationStart`, + * - `ActivationStart`, + * - `GuardsCheckEnd`, + * - `ResolveStart`, + * - `ResolveEnd`, + * - `ActivationEnd` + * - `ChildActivationEnd` + * - `NavigationEnd`, + * - `NavigationCancel`, + * - `NavigationError` * * @stable */ diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index 56ae3d4ce6..0ec50cdfd2 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -191,7 +191,7 @@ function defaultRouterHook(snapshot: RouterStateSnapshot): Observable { * * Provides the navigation and url manipulation capabilities. * - * See {@link Routes} for more details and examples. + * See `Routes` for more details and examples. * * @ngModule RouterModule * @@ -213,7 +213,7 @@ export class Router { /** * Error handler that is invoked when a navigation errors. * - * See {@link ErrorHandler} for more information. + * See `ErrorHandler` for more information. */ errorHandler: ErrorHandler = defaultErrorHandler; @@ -486,10 +486,10 @@ export class Router { return this.navigateByUrl(this.createUrlTree(commands, extras), extras); } - /** Serializes a {@link UrlTree} into a string */ + /** Serializes a `UrlTree` into a string */ serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); } - /** Parses a string into a {@link UrlTree} */ + /** Parses a string into a `UrlTree` */ parseUrl(url: string): UrlTree { return this.urlSerializer.parse(url); } /** Returns whether the url is activated */ diff --git a/packages/router/src/router_module.ts b/packages/router/src/router_module.ts index 44d5baade2..9dbb8ed41a 100644 --- a/packages/router/src/router_module.ts +++ b/packages/router/src/router_module.ts @@ -136,15 +136,15 @@ export class RouterModule { * Creates a module with all the router providers and directives. It also optionally sets up an * application listener to perform an initial navigation. * - * Options (see {@link ExtraOptions}): + * Options (see `ExtraOptions`): * * `enableTracing` makes the router log all its internal events to the console. * * `useHash` enables the location strategy that uses the URL fragment instead of the history * API. * * `initialNavigation` disables the initial navigation. * * `errorHandler` provides a custom error handler. - * * `preloadingStrategy` configures a preloading strategy (see {@link PreloadAllModules}). + * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`). * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See - * {@link ExtraOptions} for more details. + * `ExtraOptions` for more details. */ static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders { return { @@ -279,7 +279,7 @@ export interface ExtraOptions { errorHandler?: ErrorHandler; /** - * Configures a preloading strategy. See {@link PreloadAllModules}. + * Configures a preloading strategy. See `PreloadAllModules`. */ preloadingStrategy?: any; diff --git a/packages/router/src/router_outlet_context.ts b/packages/router/src/router_outlet_context.ts index 7ceb1f7abb..58560156ff 100644 --- a/packages/router/src/router_outlet_context.ts +++ b/packages/router/src/router_outlet_context.ts @@ -13,7 +13,7 @@ import {ActivatedRoute} from './router_state'; /** - * Store contextual information about a {@link RouterOutlet} + * Store contextual information about a `RouterOutlet` * * @stable */ @@ -26,7 +26,7 @@ export class OutletContext { } /** - * Store contextual information about the children (= nested) {@link RouterOutlet} + * Store contextual information about the children (= nested) `RouterOutlet` * * @stable */ diff --git a/packages/router/src/router_state.ts b/packages/router/src/router_state.ts index 375d496d79..aa64ec3720 100644 --- a/packages/router/src/router_state.ts +++ b/packages/router/src/router_state.ts @@ -41,7 +41,7 @@ import {Tree, TreeNode} from './utils/tree'; * } * ``` * - * See {@link ActivatedRoute} for more information. + * See `ActivatedRoute` for more information. * * @stable */ diff --git a/packages/router/src/shared.ts b/packages/router/src/shared.ts index b29c144007..c4484092ce 100644 --- a/packages/router/src/shared.ts +++ b/packages/router/src/shared.ts @@ -89,7 +89,7 @@ class ParamsAsMap implements ParamMap { } /** - * Convert a {@link Params} instance to a {@link ParamMap}. + * Convert a `Params` instance to a `ParamMap`. * * @stable */ diff --git a/packages/router/src/url_tree.ts b/packages/router/src/url_tree.ts index aac94dd96d..ae3275a8d3 100644 --- a/packages/router/src/url_tree.ts +++ b/packages/router/src/url_tree.ts @@ -131,7 +131,7 @@ export class UrlTree { * * Represents the parsed URL segment group. * - * See {@link UrlTree} for more information. + * See `UrlTree` for more information. * * @stable */ @@ -144,7 +144,7 @@ export class UrlSegmentGroup { parent: UrlSegmentGroup|null = null; constructor( - /** The URL segments of this group. See {@link UrlSegment} for more information */ + /** The URL segments of this group. See `UrlSegment` for more information */ public segments: UrlSegment[], /** The list of children of this group */ public children: {[key: string]: UrlSegmentGroup}) { @@ -243,22 +243,22 @@ export function mapChildrenIntoArray( * The url serialization strategy is customizable. You can * make all URLs case insensitive by providing a custom UrlSerializer. * - * See {@link DefaultUrlSerializer} for an example of a URL serializer. + * See `DefaultUrlSerializer` for an example of a URL serializer. * * @stable */ export abstract class UrlSerializer { - /** Parse a url into a {@link UrlTree} */ + /** Parse a url into a `UrlTree` */ abstract parse(url: string): UrlTree; - /** Converts a {@link UrlTree} into a url */ + /** Converts a `UrlTree` into a url */ abstract serialize(tree: UrlTree): string; } /** * @description * - * A default implementation of the {@link UrlSerializer}. + * A default implementation of the `UrlSerializer`. * * Example URLs: * @@ -274,13 +274,13 @@ export abstract class UrlSerializer { * @stable */ export class DefaultUrlSerializer implements UrlSerializer { - /** Parses a url into a {@link UrlTree} */ + /** Parses a url into a `UrlTree` */ parse(url: string): UrlTree { const p = new UrlParser(url); return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment()); } - /** Converts a {@link UrlTree} into a url */ + /** Converts a `UrlTree` into a url */ serialize(tree: UrlTree): string { const segment = `/${serializeSegment(tree.root, true)}`; const query = serializeQueryParams(tree.queryParams); diff --git a/packages/router/testing/src/router_testing_module.ts b/packages/router/testing/src/router_testing_module.ts index 2bc057ea66..1482329ca9 100644 --- a/packages/router/testing/src/router_testing_module.ts +++ b/packages/router/testing/src/router_testing_module.ts @@ -136,7 +136,7 @@ export function setupTestingRouter( * Sets up the router to be used for testing. * * The modules sets up the router to be used for testing. - * It provides spy implementations of {@link Location}, {@link LocationStrategy}, and {@link + * It provides spy implementations of `Location`, `LocationStrategy`, and {@link * NgModuleFactoryLoader}. * * ### Example