title: Updating title tag using AngularJS and UI-Router
body: <p>I am running into a weird issue while trying to set the title of the page using the name of the current state (via ui-router).</p>
  
  <p>Actually, the issue is not with setting the title, the  issue is that the title gets set to the title of the next state before the history.pushState.  So when I transition to a new url, the first item in the history has the same name as the current page.</p>
  
  <p>I was just playing around with the sample (<a href="http://angular-ui.github.io/ui-router/sample/">http://angular-ui.github.io/ui-router/sample/</a>) and I managed to reproduce it there as well.  If you click on About, then back on home you will see 2 different entries for 'home'.  They both point to the correct url, but their names are mangled.  Weirdly enough, clicking through the Contact.list and contact.details sets the history properly.</p>
  
  <p>Is there a way around this?  When in the pipeline does the history.pushstate get called?</p>