How to use the signal based approach with dynamic params? #158
-
|
Hey there! I'm wondering how I can use dynamic variables from a component to call a query within a service. The way of doing this in react would be: If i mutate textQuery with for example an text input, the query will refresh automatically. In Angular on the other hand, how would i do this with the Component and Service Constellation: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
It would basically be this example: https://github.com/ngneat/query?tab=readme-ov-file#utils |
Beta Was this translation helpful? Give feedback.
-
|
Check the updateOptions method: https://github.com/ngneat/query/blob/main/src/app/dynamic-page/dynamic-page.component.ts |
Beta Was this translation helpful? Give feedback.
-
|
You are completely right. I oversaw this small Input Binding there. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Check the updateOptions method:
https://github.com/ngneat/query/blob/main/src/app/dynamic-page/dynamic-page.component.ts