diff --git a/packages/router/src/directives/router_outlet.ts b/packages/router/src/directives/router_outlet.ts index 4e6420357b..1bf9a0ef2c 100644 --- a/packages/router/src/directives/router_outlet.ts +++ b/packages/router/src/directives/router_outlet.ts @@ -72,6 +72,11 @@ export class RouterOutlet implements OnDestroy, OnInit { } } + /** @deprecated since v4 **/ + get locationInjector(): Injector { return this.location.injector; } + /** @deprecated since v4 **/ + get locationFactoryResolver(): ComponentFactoryResolver { return this.resolver; } + get isActivated(): boolean { return !!this.activated; } get component(): Object { diff --git a/tools/public_api_guard/router/router.d.ts b/tools/public_api_guard/router/router.d.ts index aa9c327cb6..471c6e849e 100644 --- a/tools/public_api_guard/router/router.d.ts +++ b/tools/public_api_guard/router/router.d.ts @@ -409,6 +409,8 @@ export declare class RouterOutlet implements OnDestroy, OnInit { readonly component: Object; deactivateEvents: EventEmitter; readonly isActivated: boolean; + /** @deprecated */ readonly locationFactoryResolver: ComponentFactoryResolver; + /** @deprecated */ readonly locationInjector: Injector; constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef); activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void; attach(ref: ComponentRef, activatedRoute: ActivatedRoute): void;