Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71214

Determine platfom in app.module?

$
0
0

Is it possible for me to pick up the platform in app.module.ts i.e so I could inject a certain value into a provider if running on a device and a different value if running in a browser?

I currently have something like this:

{ provide: MY_PROVIDER, useValue: { provider_value } }

so in the example above I could instead have two values - one called client_value and one called web_value and which one I use is determined by the platform?

Or is there another way of doing this?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71214

Trending Articles



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