angular/packages
Andrew Scott 314112de99 fix(core): Prevent markForCheck during change detection from causing infinite loops (#54900)
This change updates the approach to the loop in `ApplicationRef.tick`
for allowing state updates in `afterRender` hooks. It is valid to update
state in render hooks and we need to ensure we refresh views that may be
marked for check in these hooks (this can happen simply as a result of
focusing an element). This change ensures that the behavior of `markForCheck`
with respect to this loop does not change while we are actively running
change detection on a view tree.

This approach also has the benefit of preventing a regression for #18917,
where updating state in animation listeners can cause `ExpressionChanged...Error`
This should be allowed - there is nothing wrong with respect to unidirectional
data flow in this case.

There may be other cases in the future where it is valid to update
state. Rather than wrapping the render hooks and the animation flushing
in something which flips a global state flag, the idea here is that
`markForCheck` is safe and valid in all cases whenever change detection
is not actively running.

PR Close #54900
2024-03-18 16:54:01 -07:00
..
animations refactor: migrate animations to prettier formatting (#53977) 2024-01-19 20:08:57 +01:00
bazel feat(core): support TypeScript 5.4 (#54414) 2024-02-26 18:29:09 -08:00
benchpress refactor: migrate bazel, benchpress, elements and misc to prettier formatting (#53995) 2024-01-22 09:07:15 +01:00
common fix(http): exclude caching for authenticated HTTP requests (#54746) 2024-03-07 11:00:00 -08:00
compiler fix(compiler): capture data bindings for content projection purposes in blocks (#54876) 2024-03-15 15:11:19 -07:00
compiler-cli test(compiler-cli): add unit tests for output() JIT transform (#54841) 2024-03-15 15:14:32 -07:00
core fix(core): Prevent markForCheck during change detection from causing infinite loops (#54900) 2024-03-18 16:54:01 -07:00
docs/di docs: remove outdated/unsupported webworker doc (#49856) 2023-04-17 14:01:41 +00:00
elements refactor: migrate bazel, benchpress, elements and misc to prettier formatting (#53995) 2024-01-22 09:07:15 +01:00
examples refactor: migrate docs, examples, private, service worker and upgrade to prettier formatting (#54163) 2024-01-30 20:08:40 +00:00
forms docs: fix typo (#54427) 2024-02-14 15:29:21 -08:00
language-service refactor(language-service): Replace tsserverlibrary -> typescript (#54726) 2024-03-07 10:49:01 -08:00
localize docs(docs-infra): Add missing API entries to ADEV (#54530) 2024-02-21 16:41:33 +00:00
misc/angular-in-memory-web-api refactor: address prototype polution concern with better typing (#54286) 2024-02-06 18:38:47 +00:00
platform-browser refactor(platform-browser): use performance API for async animations (#53963) 2024-02-21 15:12:04 -08:00
platform-browser-dynamic refactor(platform-browser-dynamic): unused RESOURCE_CACHE_PROVIDER API has been removed (#54875) 2024-03-18 16:53:27 -07:00
platform-server refactor(core): Add hydration missmatch on the component rather than the node. (#54671) 2024-03-18 16:52:19 -07:00
private/testing refactor(core): properly type withBody and withHead testing helpers (#54801) 2024-03-11 08:59:55 -07:00
router Revert "fix(router): Routed components never inherit RouterOutlet EnvironmentInjector (#54265)" (#54895) 2024-03-15 15:08:45 -07:00
service-worker refactor: migrate docs, examples, private, service worker and upgrade to prettier formatting (#54163) 2024-01-30 20:08:40 +00:00
upgrade test: fix global augmentation leaking into all source files (#54650) 2024-03-06 12:34:39 +01:00
zone.js refactor(zone.js): formatting recently changed files (#53443) 2024-03-15 18:11:34 -07:00
BUILD.bazel docs(docs-infra): Add missing API entries to ADEV (#54530) 2024-02-21 16:41:33 +00:00
circular-deps-test.conf.js
empty.ts
goog.d.ts
license-banner.txt
README.md
system.d.ts
tsconfig-build.json build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -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
tsconfig-tsec-base.json refactor(core): throw an error when hydration marker is missing from DOM (#51170) 2023-08-04 11:31:49 -04:00
tsconfig.json refactor(router): Update integration tests to cover navigation and history API (#53799) 2024-01-30 15:04:02 +00:00
tsec-exemption.json
types.d.ts

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