angular/packages
Andrew Scott a4e749ffca fix(core): When using setInput, mark view dirty in same was as markForCheck (#49711)
`ComponentRef.setInput` internally calls `markDirtyIfOnPush` which only marks
the given view as dirty but does not mark parents dirty like `ChangeDetectorRef.markForCheck` would.
f071224720/packages/core/src/render3/instructions/shared.ts (L1018-L1024)

`markDirtyIfOnPush` has an assumption that it’s being called from the parent’s template. That is, we don’t need to mark dirty to the root, because we’ve already traversed down to it.
The function used to only be called during template execution for input
bindings but was added to `setInput` later. It's not a good fit because
it means that if you are responding to events such as an emit from an `Observable`
and call `setInput`, the view of your `ComponentRef` won't necessarily get checked
when change detection runs next. If this lives inside some `OnPush` component tree
that's not already dirty, it only gets refreshed if you also call
`ChangeDetectorRef.markForCheck` in the host component (because it will be "shielded" be a non-dirty parent).

PR Close #49711
2023-04-05 10:13:21 -07:00
..
animations refactor(core): Remove NG_DEV_MODE const (#49530) 2023-03-22 15:31:48 -07:00
bazel build(core): introduce @angular/core/rxjs-interop entrypoint (#49154) 2023-03-30 09:44:38 -07:00
benchpress refactor(core): Remove ReflectiveInjector symbol (#48103) 2023-04-04 16:43:53 -07:00
common feat(platform-browser): enable HTTP request caching when using provideClientHydration (#49699) 2023-04-04 15:04:03 -07:00
compiler refactor(compiler-cli): only use a single type expression (#49136) 2023-04-03 19:20:00 -07:00
compiler-cli refactor(compiler-cli): workaround for CI failure in Windows (#49136) 2023-04-03 19:20:01 -07:00
core fix(core): When using setInput, mark view dirty in same was as markForCheck (#49711) 2023-04-05 10:13:21 -07:00
docs docs: fix packages\docs\di\di.md (#46704) 2022-07-08 17:53:39 +00:00
elements refactor(elements): ComponentNgElementStrategyFactory and ComponentNgElementStrategy are not part of the public API. (#49642) 2023-03-31 11:59:24 -07:00
examples refactor(core): Remove ReflectiveInjector symbol (#48103) 2023-04-04 16:43:53 -07:00
forms refactor(forms): Add a test that uses ControlConfig with a non-static validator. (#49693) 2023-04-05 09:08:39 -07:00
language-service refactor(compiler): required inputs prerequisite refactors (#49333) 2023-03-14 09:27:49 -07:00
localize feat(bazel): (APF) Angular Package Format updates (#49559) 2023-03-23 08:18:45 -07:00
misc/angular-in-memory-web-api build: update angular-in-memory-web-api to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
platform-browser feat(platform-browser): enable HTTP request caching when using provideClientHydration (#49699) 2023-04-04 15:04:03 -07:00
platform-browser-dynamic refactor(core): Remove usage of deprecated Injector.create() (#49606) 2023-03-28 10:15:35 -07:00
platform-server feat(platform-browser): enable HTTP request caching when using provideClientHydration (#49699) 2023-04-04 15:04:03 -07:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router refactor(router): Remove RouterTestingModule in favor of RouterModule.forRoot (#49427) 2023-04-04 15:12:33 -07:00
service-worker refactor: update code to be ES2022 compliant (#49559) 2023-03-23 08:18:45 -07:00
upgrade feat(core): remove entryComponents (#49484) 2023-03-23 10:38:03 -07:00
zone.js refactor(zone.js): remove #9100 todos. (#49409) 2023-04-04 15:10:58 -07:00
BUILD.bazel build(bazel): list docs entrypoints under packages to simplify docgen 2022-11-22 13:51:16 -07:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts
tsconfig-build.json build: update ts_library to produce ES2022 (#49559) 2023-03-23 08:18:45 -07:00
tsconfig-legacy-saucelabs.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsec-exemption.json fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT