mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Implement a new experimental API, called `resource()`. Resources are asynchronous dependencies that are managed and delivered through the signal graph. Resources are defined by their reactive request function and their asynchronous loader, which retrieves the value of the resource for a given request value. For example, a "current user" resource may retrieve data for the current user, where the request function derives the API call to make from a signal of the current user id. Resources are represented by the `Resource<T>` type, which includes signals for the resource's current value as well as its state. `WritableResource<T>` extends that type to allow for local mutations of the resource through its `value` signal (which is therefore two-way bindable). PR Close #58255 |
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| resource_spec.ts | ||