I am facing a problem with Ionic 4 native plugins. I have installed ionic 4 Cordova native plugin "Geolocation" but when I run the app into my iOS or Android device it's showing to me a blank white screen and nothing happening.
app.module.ts
code:
import {
Geolocation
} from '@ionic-native/geolocation';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
ComponentsModule
],
providers: [
StatusBar,
SplashScreen, ** Geolocation ** , {
provide: RouteReuseStrategy,
useClass: IonicRouteStrategy
}
],
bootstrap: [AppComponent]
})
Home.ts
code:
import {
Geolocation
} from '@ionic-native/geolocation';
constructor(private geolocation: Geolocation) {}
I don't know why it's happening. But It's working on Ionic 3 project.
Anyone can give me any idea why it's happening and what I did wrong.