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

Issue in auth.service.ts #14

Open
ghost opened this issue Apr 28, 2020 · 2 comments
Open

Issue in auth.service.ts #14

ghost opened this issue Apr 28, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 28, 2020

registerUser(user) {
return this.http.post(this.domain + 'authentication/register', user).map(res => res.json());
}
// and others

i got some error in .map(res => res.json());

ERROR in src/app/services/auth.service.ts:22:74 - error TS2339: Property 'map' does not exist on type 'Observable'.

22 return this.http.post(this.domain +'/authentication/register',user ).map(res => res.json());

(https://user-images.githubusercontent.com/43374749/80504269-7bed9b80-89a5-11ea-8bd5-1e84d514b25b.png

@ghost
Copy link
Author

ghost commented Apr 28, 2020

core.js:6210 ERROR DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
at http://localhost:4200/polyfills.js:2873:35
at XMLHttpRequest.proto. [as open] (http://localhost:4200/polyfills.js:1462:52)
at Observable._subscribe (http://localhost:4200/vendor.js:60630:18)
at Observable._trySubscribe (http://localhost:4200/vendor.js:76149:25)
at Observable.subscribe (http://localhost:4200/vendor.js:76135:22)
at MapOperator.call (http://localhost:4200/vendor.js:81175:23)
at Observable.subscribe (http://localhost:4200/vendor.js:76130:31)
at RegisterComponent.onRegisterSubmit (http://localhost:4200/main.js:865:45)
at RegisterComponent_Template_form_submit_5_listener (http://localhost:4200/main.js:927:150)
at executeListenerWithErrorHandling (http://localhost:4200/vendor.js:26977:16)

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

No branches or pull requests

0 participants