title: Configuring UI Router states based on configuration
body: <p>Is there a way to configure a UI Router states based on Server Side JSON file.  I wan't to avoid hard coding the States inside my <code>module.config(..)</code>.  </p>
  
  <p>I firstly thought of having controller which has the state map data available which can just call <code>$stateProvider</code>.  However, I believe, controllers cannot have providers injected into them. </p>
  
  <p>The other option I have thought was having a Javascript file outside of angular which puts the state configuration data in some global variable to be referenced from Module config function.</p>
  
  <p>But is there a better approach?</p>