I recently switched to using the Angular template in Visual Studio 2017 and decided to update to Angular 5.2. However, I encountered an error while trying to make a http call from the service class.
The error message I received is: https://i.sstatic.net/pV6pk.png
Here is the code snippet from my Service.TS file:
(Code snippet from Service.TS goes here)
And this is the Component class code:
(Code snippet from Component class goes here)
Lastly, here is the content of my app.shared.module.ts file:
(Content of app.shared.module.ts file goes here)
As a beginner in Angular, I'm unsure where I might have made a mistake. I attempted adding HttpClient under @NgModule but encountered another error. Do I need to explicitly add HttpClient in the app.shared.module.ts file or is it sufficient to use it at the service and component levels only? Any guidance on what I might be doing wrong would be greatly appreciated.