Hi everyone.
I need help with this error below.
I have created a shared component using Ionic 4. I created a module inside this shared componet and this module works fine with the providers mentioned bellow (AppVersion, Geolocation, BarcodeScanner, UniqueDeviceID, etc.) when I call my application.
My problem is:
I have put many declarations of plugins in this shared component inside this module (shared.module.ts)
@NgModule({
imports: [
CommonModule,
IonicModule,
FormsModule//,
//HttpClientModule
],
declarations: [
LoginPage,
TrocasenhaPage,
MenulateralPage,
HomologacaoComponent
],
providers: [
AppVersion,
Geolocation,
BarcodeScanner,
UniqueDeviceID
. . .
When I call this application after to use HttpClient inside providers declaration, it’s showing this error:
“StaticInjectorError(AppModule)[UsuarioService → HttpClient]”
If I put HttpClient to try ajust the error inside providers declaration, my application shows this error:
“StaticInjectorError(AppModule)[HttpClient → HttpHandler]”
After that, I try to put HttpClientModule inside “imports” declaration. So, my application shows this error:
StaticInjectorError(AppModule)[HttpHandler → Injector]:
Anybody help me ?