1

I am trying to read from appsettings.json on angular and set the url depending on the settings on appsettings.json.

On my appsettings.json I have defined the url for the test and dev environments.

I want on angular to set the urls depending on that file.

Is that possible?

Thanks

JonR
  • 89
  • 6
  • Possible duplicate of [How to load json into my angular.js ng-model?](http://stackoverflow.com/questions/13020821/how-to-load-json-into-my-angular-js-ng-model) – pgrodrigues Nov 08 '16 at 12:27

1 Answers1

0

You can use $http.get('path/to/appsettings.json') to get the data from your json file.

Nicu
  • 31
  • 1
  • 6