mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user