Is there a way to bind @Injectable () in Angular4
I am creating an Ionic 3 app (uses Angular 4). I've created a LocationProvider that will allow me to extract location services from the actual page logic so that it can be reused.
My LocationProvider uses @ ionic-native / geolocation (geolocation provider).
When I insert my LocationProvider into the page via @NgModule({ providers: [LocationProvider] })
, I get an error stating that no geolocation provider was found. Is there a way to enable the geolocation provider when using the LocationProvider? Or should I always have providers:[LocationProvider, Geolocation]
?
I'm guessing this is Ionic independent (but Angular 4), is there a way to get around the vendor list in NgModule
?
source to share