Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49224

Serving, but without providers for native plugins

$
0
0

@donotsue wrote:

Hi there,

I implemented the native contacts plugin. Now when I start “ionic serve” I get “No provider for Contacts!”, and the app stops. No problem! I understand this error and why it appears (I think).

My question is, how to avoid this error on serving. In Ionic1 I used a platform instance and requested on what platform the app is running. Do I still (in Ionic2) have to look on which platform an app is running when implementing/using native plugins and handle the code platform specific? Or has the way to act changed with Ionic2?

For instance: I could use an GPS native plugin. But when I start the app with “ionic serve” on a win7 machine I would get a hint to that provider not existing at least (at worst the app stops).

What do I have to do at this point?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>