angular/packages/compiler-cli/linker/src
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
..
ast refactor(compiler-cli): emit forwardRef invocation for forward type references (#40117) 2020-12-22 08:39:58 -08:00
file_linker fix(core): QueryList should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
fatal_linker_error.ts refactor(compiler-cli): linker - add Babel plugin, FileLinker and initial PartialLinkers (#39116) 2020-10-19 11:23:45 -07:00
linker_import_generator.ts refactor(compiler-cli): linker - add Babel plugin, FileLinker and initial PartialLinkers (#39116) 2020-10-19 11:23:45 -07:00