title: $state.href with absolute: true doesn't return the right url
body: <p>I'm using Angular and UI router. I'm trying to get a link shown on the page that the user can copy and share. <a href="https://stackoverflow.com/questions/24502065/angularjs-ui-router-get-the-absolute-url-of-the-state-with-the-parameters">This thread</a> has shown me that <code>$state.href</code> is the function I'm looking for, however it isn't generating the correct link.</p>
  
  <p>An important detail here is that the root of my application is not the root of the domain. In this case, the domain is <code>localhost</code>, but the root of the angular app is in <code>localhost/dev/app/</code>.</p>
  
  <p>Here's the command I'm using inside my controller.</p>
  
  <pre><code>$scope.url = $state.href('survey', { survey: "asd" }, {absolute: true});
  </code></pre>
  
  <p>In my app.js, the following route is declared:</p>
  
  <pre><code>.state('survey', {
      url: "/:survey/survey?ao",
      templateUrl: "views/survey/survey.html",
      controller: "surveyController",
      },
      data: { 
          requireLogin: false,
          requireAdmin: false
      }})
  </code></pre>
  
  <p>This should return <code>http://localhost/dev/app/#/asd/survey</code>, instead it returns <code>http://localhost/#/asd/survey</code>.</p>
  
  <p>(The remarkable thing is that <code>ui-sref="survey({survey: "asd"})</code> does translate to the correct link.)</p>
  
  <p>Is there a way I can fix this so I get the full url? </p>