0

I had a look on the following official document of Ionic

 http://docs.ionic.io/docs/io-config

First it didn't work (when I run the command to add a new key it always finish with the same error "Unauthorized configuration value") and then, the document doesn't describe how to get/find the values in my angular controllers (should I use $ionicCoreSettings?).

It would be for me really useful to have a configuration file where I could put my variables, specially the url of my backend, since this one during the development period doesn't have a fixed IP.

Any idea or best practice to suggest about storing and resolving such variables?

David Dal Busco
  • 7,975
  • 15
  • 55
  • 96

1 Answers1

0

I solved my question using angular constant.

To define the constant I add a look at the solution of @Linkmichiel in

is there a way in Angularjs to define constants with other constants?

and I added the use of the constant in the html with the solution of @Nimo using rootscrope in

Can I directly access module constant from HTML under AngularJS

Community
  • 1
  • 1
David Dal Busco
  • 7,975
  • 15
  • 55
  • 96