refactor(router): Provide easily patchable file for assigning relativeLinkResolution (#47136)

For context on the migration plan, see b/241955063

PR Close #47136
This commit is contained in:
Andrew Scott
2022-08-11 18:55:07 -07:00
committed by Pawel Kozlowski
parent 757684b705
commit d4f44bde50
2 changed files with 16 additions and 0 deletions
@@ -0,0 +1,13 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Exists to aid internal migration off of the deprecated relativeLinkResolution option.
*/
export function assignRelativeLinkResolution(
router: {relativeLinkResolution: 'legacy'|'corrected'}): void {}
+3
View File
@@ -24,6 +24,7 @@ import {recognize} from './operators/recognize';
import {resolveData} from './operators/resolve_data';
import {switchTap} from './operators/switch_tap';
import {DefaultTitleStrategy, TitleStrategy} from './page_title_strategy';
import {assignRelativeLinkResolution} from './patchable_relative_link_resolution';
import {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';
import {ErrorHandler, ExtraOptions, ROUTER_CONFIGURATION} from './router_config';
import {RouterConfigLoader, ROUTES} from './router_config_loader';
@@ -349,6 +350,8 @@ export function setupRouter() {
assignExtraOptionsToRouter(opts, router);
assignRelativeLinkResolution(router);
return router;
}