feat(core): expose `ViewRef` as `ChangeDetectorRef`

closes #12722

This is helpful when manually dirty checking embedded views.
This commit is contained in:
Tobias Bosch 2016-11-04 14:40:37 -07:00 committed by Victor Berchet
parent 9f7d32a326
commit 1b5384ee54
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import {AppView} from './view';
/** /**
* @stable * @stable
*/ */
export abstract class ViewRef { export abstract class ViewRef extends ChangeDetectorRef {
get destroyed(): boolean { return <boolean>unimplemented(); } get destroyed(): boolean { return <boolean>unimplemented(); }
abstract onDestroy(callback: Function): any /** TODO #9100 */; abstract onDestroy(callback: Function): any /** TODO #9100 */;

View File

@ -1000,7 +1000,7 @@ export declare enum ViewEncapsulation {
} }
/** @stable */ /** @stable */
export declare abstract class ViewRef { export declare abstract class ViewRef extends ChangeDetectorRef {
destroyed: boolean; destroyed: boolean;
abstract onDestroy(callback: Function): any; abstract onDestroy(callback: Function): any;
} }