0
That’s the structure of my little project;
And be able to import the http module into my project as you can see below;
But after importing the method into my service class it generates errors in the code because it does not recognize the method get as you can see below;
I need help fixing this, I’m with the version of Angular 10 and I don’t understand why you’re making this mistake.
If I navigate directly to the Httpclientmodule class I can locate the method get who is not being recognized in my class of services, I wonder what went wrong
In the module you import the module
import { HttpClientModule }
, service vc uses the classes with the methodsimport { HttpClient }
– LeAndrade
Our dear, I would never imagine it to be that way, from angula 2 until the 10 changed some things and left me confused, thank you very much, can post your reply to me mark as correct.
– wladyband
I don’t think you need an answer for this no, until pq, even in version 2 is the same way, in the service you matter the class with the methods and in the module the modules!
– LeAndrade