From 1b5384ee54d8faeb3222f312868f28d26d8d42e9 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Fri, 4 Nov 2016 14:40:37 -0700 Subject: [PATCH] feat(core): expose `ViewRef` as `ChangeDetectorRef` closes #12722 This is helpful when manually dirty checking embedded views. --- modules/@angular/core/src/linker/view_ref.ts | 2 +- tools/public_api_guard/core/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/@angular/core/src/linker/view_ref.ts b/modules/@angular/core/src/linker/view_ref.ts index 9835fe95c1..24948f6d9c 100644 --- a/modules/@angular/core/src/linker/view_ref.ts +++ b/modules/@angular/core/src/linker/view_ref.ts @@ -17,7 +17,7 @@ import {AppView} from './view'; /** * @stable */ -export abstract class ViewRef { +export abstract class ViewRef extends ChangeDetectorRef { get destroyed(): boolean { return unimplemented(); } abstract onDestroy(callback: Function): any /** TODO #9100 */; diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 9c98bcd23b..4e390cf629 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -1000,7 +1000,7 @@ export declare enum ViewEncapsulation { } /** @stable */ -export declare abstract class ViewRef { +export declare abstract class ViewRef extends ChangeDetectorRef { destroyed: boolean; abstract onDestroy(callback: Function): any; }