mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
8975b4346d
RESOURCE_COMPLETED_BEFORE_PRODUCING_VALUE had no guide, no JSDoc on RxResourceOptions.stream, and — since the code was positive rather than negative — could never get an auto-linked docs page even if one existed. Flip it to -991, add the NG0991 reference page, and document the "stream must emit a value or an error before completing" requirement on stream's JSDoc and in the RxJS interop guide. Also documents and tests that an unguarded template read of an errored resource's .value() propagates to the global ErrorHandler, and recommends guarding with .hasValue() as defense in depth. httpResource can throw the same error, but for a different reason: its internal request Observable isn't something app code writes directly, so an empty completion there is almost always an HttpInterceptor swallowing the response (catchError(() => EMPTY)) rather than a stream authored in the resource() call itself. The page covers both APIs with guidance matched to what's actually going on for each.