/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {ApplicationRef} from '../application_ref'; import {ChangeDetectorRef} from '../change_detection/change_detector_ref'; /** * @stable */ export abstract class ViewRef extends ChangeDetectorRef { /** * Destroys the view and all of the data structures associated with it. */ abstract destroy(): void; abstract get destroyed(): boolean; abstract onDestroy(callback: Function): any /** TODO #9100 */; } /** * Represents an Angular View. * * * A View is a fundamental building block of the application UI. It is the smallest grouping of * Elements which are created and destroyed together. * * Properties of elements in a View can change, but the structure (number and order) of elements in * a View cannot. Changing the structure of Elements can only be done by inserting, moving or * removing nested Views via a {@link ViewContainerRef}. Each View can contain many View Containers. * * * ### Example * * Given this template... * * ``` * Count: {{items.length}} *