mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Before `resource()` resolves, its value is in an unknown state. By default it returns `undefined` in these scenarios, so the type of `.value()` includes `undefined`. This commit adds a `defaultValue` option to `resource()` and `rxResource()` which overrides this default. When provided, an unresolved resource will return this value instead of `undefined`, which simplifies the typing of `.value()`. PR Close #59655 |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| index.ts | ||
| PACKAGE.md | ||
| public_api.ts | ||