fix(core): complete EventEmitter in QueryList on component destroy (#18902)

Fixes #18741

PR Close #18902
This commit is contained in:
Marc Laval
2017-08-28 16:07:52 +02:00
committed by Miško Hevery
parent 185a941acc
commit 36d37cc6ae
3 changed files with 20 additions and 0 deletions

View File

@ -108,6 +108,12 @@ export class QueryList<T>/* implements Iterable<T> */ {
/** internal */
get dirty() { return this._dirty; }
/** internal */
destroy(): void {
this._emitter.complete();
this._emitter.unsubscribe();
}
}
function flatten<T>(list: Array<T|T[]>): T[] {