mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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. |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| testing | ||
| BUILD.bazel | ||
| index.ts | ||
| PACKAGE.md | ||
| public_api.ts | ||