Skip to content

Commit d7f2ac3

Browse files
MeAkibAndrewKushnir
authored andcommitted
docs: fix rxResource example to return object from params function (angular#64327)
Previously, the example returned a plain value instead of an object, causing destructuring in the `stream` function to fail. Updated to `params: () => ({ userId: this.userId() })` for correctness. fixes: angular#64313 Update adev/src/content/ecosystem/rxjs-interop/signals-interop.md Co-authored-by: Matthieu Riegler <[email protected]> PR Close angular#64327
1 parent 59c1528 commit d7f2ac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adev/src/content/ecosystem/rxjs-interop/signals-interop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class UserProfile {
146146
protected userId = input<string>();
147147

148148
private userResource = rxResource({
149-
params: () => this.userId(),
149+
params: () => ({ userId: this.userId() }),
150150

151151
// The `stream` property expects a factory function that returns
152152
// a data stream as an RxJS Observable.

0 commit comments

Comments
 (0)