refactor(router): deprecate no longer needed resolver fields (#45597)

DEPRECATED:

The `resolver` argument of the `RouterOutletContract.activateWith` function and the `resolver` field of the `OutletContext` class are deprecated. Passing component factory resolvers are no longer needed. The `ComponentFactoryResolver`-related symbols were deprecated in `@angular/core` package since v13.

PR Close #45597
This commit is contained in:
Andrew Scott
2022-04-18 14:57:19 -07:00
committed by Dylan Hunn
parent f4fd1a8262
commit 1d2f5c1101
4 changed files with 21 additions and 1 deletions
@@ -53,6 +53,9 @@ export interface RouterOutletContract {
activateWith(activatedRoute: ActivatedRoute, environmnetInjector: EnvironmentInjector|null): void;
/**
* Called by the `Router` when the outlet should activate (create a component).
*
* @deprecated Passing a resolver to retrieve a component factory is not required and is
* deprecated since v14.
*/
activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;
@@ -20,6 +20,10 @@ import {ActivatedRoute} from './router_state';
export class OutletContext {
outlet: RouterOutletContract|null = null;
route: ActivatedRoute|null = null;
/**
* @deprecated Passing a resolver to retrieve a component factory is not required and is
* deprecated since v14.
*/
resolver: ComponentFactoryResolver|null = null;
injector: EnvironmentInjector|null = null;
children = new ChildrenOutletContexts();