Replies: 5 comments
-
Start a new pull request in StackBlitz Codeflow. |
Beta Was this translation helpful? Give feedback.
-
computed isn't an injection context and you're calling result() |
Beta Was this translation helpful? Give feedback.
-
@NetanelBasal I understand the point about computed() not being an injection context. How can I ensure it functions correctly? Without using computed(), how do I manage the stream to update when |
Beta Was this translation helpful? Give feedback.
-
Move the this.getProduct(this.productId()!).result() to a property? |
Beta Was this translation helpful? Give feedback.
-
@NetanelBasal like that?
But when the route change it not trigger the query with the new id.. |
Beta Was this translation helpful? Give feedback.
-
Which @ngneat/query-* package(s) are the source of the bug?
query
Is this a regression?
Yes
Description
I'm trying to integrate
ngneat/query
with signals in my Angular application. However, I'm encountering the following error:In my code example, I'm attempting to load a product based on a parameter from the route. To achieve this, I convert the product parameter into a signal using:
Then, inside the computed function, I call
ngneat/query
with that signal. However, it's not working as expected. What am I missing in my code to make it function correctly?You can find a StackBlitz demo of my code here.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-5mnt2f
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes
Beta Was this translation helpful? Give feedback.
All reactions