angular/packages
Alan Agius 45a6ac09fd fix(http): force macro task creation during HTTP request (#49546)
This commit adds a background macrotask when an XHR request is performed. The macrotask is started during `loadstart` and ended during `loadend` event.

The macrotask is needed so that the application is not stabilized during HTTP calls. This is important for server rendering, as the application is rendering when the application is stabilized.
The application is stabilized when there are no longer pending Macro and Micro tasks intercepted by Zone.js, Since an XHR request is none of these, we create a background macrotask so that Zone.js is
made aware that there is something pending.

Prior to this change, we patched the `HttpHandler` in `@angular/platform-server` but this is not enough, as there can be multiple `HttpHandler` in an application, example when importing `HttpClient` in a lazy loaded component/module.
Which causes a new unpatched instance of `HttpHandler` to be created in the child injector which is not intercepted by Zone.js and thus the application is stabalized and rendered before the XHR request is finalized.

NB: Zone.js is fundamental for SSR and currently, it's not possible to do SSR without it.

Closes: #49425

PR Close #49546
2023-03-29 09:13:41 -07:00
..
animations refactor(core): Remove NG_DEV_MODE const (#49530) 2023-03-22 15:31:48 -07:00
bazel feat(bazel): (APF) Angular Package Format updates (#49559) 2023-03-23 08:18:45 -07:00
benchpress refactor(core): Remove usage of deprecated Injector.create() (#49606) 2023-03-28 10:15:35 -07:00
common fix(http): force macro task creation during HTTP request (#49546) 2023-03-29 09:13:41 -07:00
compiler fix(compiler): do not unquote CSS values (#49460) 2023-03-28 11:35:38 -07:00
compiler-cli feat(compiler-cli): Add an extended diagnostic for nSkipHydration (#49512) 2023-03-23 13:54:03 -07:00
core refactor(core): expose ReactiveNode privately on signal functions (#49529) 2023-03-28 18:47:58 -07:00
docs docs: fix packages\docs\di\di.md (#46704) 2022-07-08 17:53:39 +00:00
elements refactor: update code to be ES2022 compliant (#49559) 2023-03-23 08:18:45 -07:00
examples feat(core): remove entryComponents (#49484) 2023-03-23 10:38:03 -07:00
forms refactor: update code to be ES2022 compliant (#49559) 2023-03-23 08:18:45 -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 refactor(core): Remove usage of deprecated Injector.create() (#49606) 2023-03-28 10:15:35 -07:00
platform-browser-dynamic refactor(core): Remove usage of deprecated Injector.create() (#49606) 2023-03-28 10:15:35 -07:00
platform-server fix(http): force macro task creation during HTTP request (#49546) 2023-03-29 09:13:41 -07:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router refactor(core): internal tracker of pending tasks during initial rendering (#49576) 2023-03-28 16:19:31 -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 feat(zone.js): jest 29 should ignore uncaught error console log (#49325) 2023-03-27 08:33:49 -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 build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
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 build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
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