ViewRef

abstract class ViewRef extends ChangeDetectorRef { abstract get destroyed: boolean abstract destroy(): void abstract onDestroy(callback: Function): any // 继承自 core/ChangeDetectorRef abstract markForCheck(): void abstract detach(): void abstract detectChanges(): void abstract checkNoChanges(): void abstract reattach(): void }

属性

属性名类型说明
destroyed只读

方法

Destroys the view and all of the data structures associated with it.

abstract destroy(): void

参数

没有参数。

返回值

void

abstract onDestroy(callback: Function): any

参数

callback

Type: Function.

返回值

any