Fire model view close event when destroyed (#1427)

This commit is contained in:
Matt Irvine
2018-05-15 17:35:31 -07:00
committed by GitHub
parent 5707b58fda
commit d526fe0f7f
4 changed files with 9 additions and 0 deletions

View File

@@ -27,6 +27,8 @@ const componentRegistry = <IComponentRegistry>Registry.as(Extensions.ComponentCo
export abstract class ViewBase extends AngularDisposable implements IModelView {
protected readonly modelStore: IModelStore;
protected rootDescriptor: IComponentDescriptor;
protected _onDestroy = new Emitter<void>();
public readonly onDestroy = this._onDestroy.event;
constructor(protected changeRef: ChangeDetectorRef) {
super();
this.modelStore = new ModelStore();