injection context and route params with query #138
-
Hi there, thanks for this awesome adapter. One thing I'm not sure about is the best practice to work with RouterInputs aka route-params like a todo id. To use the query with the id you have to be in an injection context, but to get the id you have to be in a lifecycle hook. Am I missing something? I could use the activateRoute paramMap and switchMap to the TodoService and convert that to a signal -> seems to be bad DX for a simple task like that. Any ideas or best practices for this? |
Beta Was this translation helpful? Give feedback.
Answered by
NetanelBasal
Dec 2, 2023
Replies: 1 comment 2 replies
-
Can you create a basic demo on stackblitz? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ejthan You can see an example here:
https://github.com/ngneat/query/blob/main/src/app/dynamic-page/dynamic-page.component.ts