angular/packages/common/http
Miles Malerba 2206efa55f feat(core): add special return statuses for resource params
Allows throwing from the resource's params function to transition the
resource to a status other than resolved.

In particular, the following values can be thrown from params:
- `ResourceParamsStatus.IDLE` causes the resource to become `idle`
  (equivalent to returning `undefined`)
- `ResourceParamsStatus.LOADING` causes the resource to become `loading`
- Any `Error` object causes the resource to become `error` and report
  the error that was thrown via `.error()`

To simplify chaining together resources, this PR also introduces a
context object passed into to the `params` functon. This context
contains a `chain` function that can be used to get the value of a
resource that the params want to depend on, while automatically
propagating the idle, loading, and erorr states of the resource forward.
2026-03-02 08:47:14 -08:00
..
src feat(core): add special return statuses for resource params 2026-03-02 08:47:14 -08:00
test feat(core): add special return statuses for resource params 2026-03-02 08:47:14 -08:00
testing build: format md files 2025-11-06 10:03:05 -08:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
index.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
PACKAGE.md build: format md files 2025-11-06 10:03:05 -08:00
public_api.ts refactor(http): expose withXhr to prepare for fetch by default 2026-02-24 09:26:26 -08:00