docs: fix rxResource example to return object from params function (#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: #64313

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

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #64327
This commit is contained in:
Shuaib Hasan Akib
2025-10-10 10:13:46 +06:00
committed by Andrew Kushnir
parent 59c152833e
commit d7f2ac3342
@@ -146,7 +146,7 @@ export class UserProfile {
protected userId = input<string>();
private userResource = rxResource({
params: () => this.userId(),
params: () => ({ userId: this.userId() }),
// The `stream` property expects a factory function that returns
// a data stream as an RxJS Observable.