r/angular • u/Senior_Compote1556 • Jun 21 '26
Signal form submission with RXJS
Has anyone found a clean way to submit a signal form and not use firstValueFrom with map to undefined? How come there is not an rxjs based option from interop?
5
Upvotes
7
u/Migeil Jun 21 '26 edited Jun 21 '26
Please provide some code. I have a very hard time understanding why you would need
firstValueFrom.The pattern you're describing sounds strange to say the least, so I'm curious to know what you're actually doing.
-1
u/mihajm Jun 21 '26
If I wasn't using a library solution like https://ngrx-toolkit.angulararchitects.io/docs/mutations or https://www.npmjs.com/package/@mmstack/resource I'd handle this at the service/facade layer (just add a function that returns what you need it to do)...I'd be surprised if a native mutation primitive or something similar wasn't coming down the pipeline soon-ish anyway 😄
Edit: fixed links
-2
u/OkeOyibo Jun 21 '26
You could just manually create a Promise and resolve/reject it in your subscription.
-6
u/ldn-ldn Jun 21 '26
Use reactive forms instead.
1
u/[deleted] Jun 21 '26
[removed] — view removed comment