angular/packages/core/src/compiler
Misko Hevery e32b6256ce fix(core): QueryList should not fire changes if the underlying list did not change. (#40091)
Previous implementation would fire changes `QueryList.changes.subscribe`
whenever the `QueryList` was recomputed. This resulted in artificially
high number of change notifications, as it is possible that recomputing
`QueryList` results in the same list. When the `QueryList` gets recomputed
is an implementation detail and it should not be the thing which determines
how often change event should fire.

This change introduces a new `emitDistinctChangesOnly` option for
`ContentChildren` and `ViewChildren`.

```
export class QueryCompWithStrictChangeEmitParent {
  @ContentChildren('foo', {
    // This option will become the default in the future
    emitDistinctChangesOnly: true,
  })
  foos!: QueryList<any>;
}
```

PR Close #40091
2021-01-14 13:55:02 -08:00
..
BUILD.bazel style: enforce buildifier lint on CI (#28186) 2019-02-26 16:57:41 -08:00
compiler_facade.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compiler_facade_interface.ts fix(core): QueryList should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00