66 * found in the LICENSE file at https://angular.io/license 
77 */ 
88
9- import  { Observable }  from  'rxjs' ; 
9+ import  { Observable ,   Subject }  from  'rxjs' ; 
1010
1111import  { EventEmitter }  from  '../event_emitter' ; 
1212import  { Writable }  from  '../interface/type' ; 
@@ -48,7 +48,7 @@ export class QueryList<T> implements Iterable<T> {
4848 private  _onDirty ?: ( )  =>  void =  undefined ; 
4949 private  _results : Array < T >  =  [ ] ; 
5050 private  _changesDetected : boolean  =  false ; 
51-  private  _changes : EventEmitter < QueryList < T > >  |  undefined  =  undefined ; 
51+  private  _changes : Subject < QueryList < T > >  |  undefined  =  undefined ; 
5252
5353 readonly  length : number  =  0 ; 
5454 readonly  first : T  =  undefined ! ; 
@@ -58,7 +58,7 @@ export class QueryList<T> implements Iterable<T> {
5858 * Returns `Observable` of `QueryList` notifying the subscriber of changes. 
5959 */ 
6060 get  changes ( ) : Observable < any >  { 
61-  return  ( this . _changes  ??=  new  EventEmitter ( ) ) ; 
61+  return  ( this . _changes  ??=  new  Subject ( ) ) ; 
6262 } 
6363
6464 /** 
@@ -171,7 +171,7 @@ export class QueryList<T> implements Iterable<T> {
171171 */ 
172172 notifyOnChanges ( ) : void { 
173173 if  ( this . _changes  !==  undefined  &&  ( this . _changesDetected  ||  ! this . _emitDistinctChangesOnly ) ) 
174-  this . _changes . emit ( this ) ; 
174+  this . _changes . next ( this ) ; 
175175 } 
176176
177177 /** @internal  */ 
0 commit comments