angular-docs-cn/packages/core/test/bundling/router
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 build: create sample router app (#38714) 2020-09-11 12:10:46 -07:00
bundle.golden_symbols.json fix(core): `QueryList` should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
index.html build: create sample router app (#38714) 2020-09-11 12:10:46 -07:00
index.ts build: create sample router app (#38714) 2020-09-11 12:10:46 -07:00
treeshaking_spec.ts build: create sample router app (#38714) 2020-09-11 12:10:46 -07:00