mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Pawel Kozlowski
parent
757684b705
commit
d4f44bde50
@@ -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 {}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user