Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultDataService HttpOptions #4126

Closed
1 of 2 tasks
Tom-Neo opened this issue Nov 13, 2023 · 2 comments · Fixed by #4134
Closed
1 of 2 tasks

DefaultDataService HttpOptions #4126

Tom-Neo opened this issue Nov 13, 2023 · 2 comments · Fixed by #4134

Comments

@Tom-Neo
Copy link
Contributor

Tom-Neo commented Nov 13, 2023

Which @ngrx/* package(s) are the source of the bug?

data

Minimal reproduction of the bug/regression with instructions

Use of DefaultDataService methods with parameter (options?: HttpOptions) dosn't work.

Example dont work;
super.getAll({httpParams: {fromObject: {language: 'en'}} })

this works:
super.execute('GET', this.entitiesUrl, null, { params: new HttpParams().set('language', 'en') })
or
super.getAll({ params: new HttpParams().set('language', language: 'en') } as any)

Expected behavior

HttpOptions should correctly passed to the http client

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)

"@ngrx/data": "^16.2.0",
"@angular/core": "^16.2.6",

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@timdeschryver
Copy link
Member

@Tom-Neo could you elaborate with "does work" and "doesn't work" please.
What's the expected result, and which result do you get instead?
Ideally, this is a runnable example.

Also, if this is a bug feel free to create a Pull Request with a fix.

@Tom-Neo
Copy link
Contributor Author

Tom-Neo commented Nov 15, 2023

I'm using a derivative of the DefaultDataService class and wanted to use the methods' parameter options.
The http options are not passed correctly or the type is not correct.
How to properly use options to pass HttpParams?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants