title: Set base URL in angularjs project based on the environment
body: <p>I'm working on an AngularJs project created using Yeoman. The project uses Grunt as task manager.</p>
  
  <p>In my index.html I need to set the base url:</p>
  
  <pre><code>&lt;base href="/"&gt;
  </code></pre>
  
  <p>The href attribute value depends on the environment: if the environment is development I want href to be simply <code>/</code>, if the environment is production the value has to be something else <code>a/b/c</code>.</p>
  
  <p>What are the available solutions to this problem?</p>
  
  <p>It is possible to set it dynamically at runtime using a constant from AngualrJs or it is better to set it statically at build/serve time?</p>