Timeline for HttpClient throwing error in Angular when used in service
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 7, 2019 at 19:47 | history | edited | nircraft | CC BY-SA 4.0 |
update HttpClient spelling
|
| Jun 7, 2019 at 19:46 | comment | added | Noremac |
When the parameter in the constructor is declared as public or private it is added to this. and is it also accessible directly. Without the public or private it works as you are saying.
|
|
| Jun 7, 2019 at 19:43 | comment | added | msanford | @Coder You're causing an exception to be thrown in the constructor, so other things later will likely fail. Is there more code in the service, or just that? If so please update the question. | |
| Jun 7, 2019 at 19:41 | comment | added | Coder |
Thanks. But even after removing this console.log statement, I am getting the same error. I think it has something to do with httpClient as I am getting error in http.js
|
|
| Jun 7, 2019 at 19:39 | history | answered | msanford | CC BY-SA 4.0 |