refactor(core): deprecate `DynamicComponentLoader` and `DebugNode.inject`
BREAKING CHANGE: - `DynamicComponentLoader` is deprecated. Use `ComponentResolver` and `ViewContainerRef` directly. - `DebugNode.inject` is deprecated. use `DebugNode.injector.get` instead.
This commit is contained in:
parent
ee7caceec7
commit
5297c9d9cc
|
@ -38,6 +38,11 @@ export class DebugNode {
|
||||||
|
|
||||||
get source(): string { return isPresent(this._debugInfo) ? this._debugInfo.source : null; }
|
get source(): string { return isPresent(this._debugInfo) ? this._debugInfo.source : null; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use injector.get(token) instead.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
inject(token: any): any { return this.injector.get(token); }
|
inject(token: any): any { return this.injector.get(token); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,9 @@ import {ComponentRef} from './component_factory';
|
||||||
import {ViewContainerRef} from './view_container_ref';
|
import {ViewContainerRef} from './view_container_ref';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service for instantiating a Component and attaching it to a View at a specified location.
|
* Use ComponentResolver and ViewContainerRef directly.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
export abstract class DynamicComponentLoader {
|
export abstract class DynamicComponentLoader {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue