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

Global constant, environment variable, config?

$
0
0

@chjoly wrote:

Nowadays, what is the best/recommended way to set a global constant to be used across the entire app, like an API url string?
I’ve read about creating a service to store the constant and injecting it in your component, whenever it’s needed.
But there is also this: http://ionicframework.com/docs/api/config/Config/
… and this option too: https://stackoverflow.com/questions/41808521/ionic2-what-is-the-best-method-to-store-static-constants-like-api-urls
And a few other options…

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49215

Trending Articles



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