Skip to content

Commit d4f44bd

Browse files
atscottPawel Kozlowski
authored andcommitted
refactor(router): Provide easily patchable file for assigning relativeLinkResolution (#47136)
For context on the migration plan, see b/241955063 PR Close #47136
1 parent 757684b commit d4f44bd

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
/**
10+
* Exists to aid internal migration off of the deprecated relativeLinkResolution option.
11+
*/
12+
export function assignRelativeLinkResolution(
13+
router: {relativeLinkResolution: 'legacy'|'corrected'}): void {}

packages/router/src/router.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {recognize} from './operators/recognize';
2424
import {resolveData} from './operators/resolve_data';
2525
import {switchTap} from './operators/switch_tap';
2626
import {DefaultTitleStrategy, TitleStrategy} from './page_title_strategy';
27+
import {assignRelativeLinkResolution} from './patchable_relative_link_resolution';
2728
import {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';
2829
import {ErrorHandler, ExtraOptions, ROUTER_CONFIGURATION} from './router_config';
2930
import {RouterConfigLoader, ROUTES} from './router_config_loader';
@@ -349,6 +350,8 @@ export function setupRouter() {
349350

350351
assignExtraOptionsToRouter(opts, router);
351352

353+
assignRelativeLinkResolution(router);
354+
352355
return router;
353356
}
354357

0 commit comments

Comments
 (0)