title: How to retrieve constants for AngularJS from backend
body: <p>i have some application settings that i want to retrieve from backend, so that they would be available to all of my application controllers via injection. What is the most angular-way to do that?</p>
  
  <p>1) If i only needed settings for one or few controllers i could retrieve them via routing resolve method, but what about global application scope?<br>
  2) I could use the .run() method, but since call will be async i have no guaranties that my config will be loaded before i access controllers.</p>
  
  <p>Currently my settings are returned as a json object, and my templates/html files are simply served by web server. So i cannot embed anything into script tags, parse html on the server side or any similar technique.</p>