angular-ui/ui-router — pull request #563 by deltaepsilon (2013-11-06 21:34:26+00:00)
Title: Make .href() support .hashPrefix()

Google's AJAX crawling protocol requires a #! root instead of just at #. This is easy to accomplish using $locationProvider.hashPrefix("!"); however, ui-router's $state.href does not currently check the hash prefix.

To improve upon this commit, consider stashing the hash prefix just outside of $state.href's closure. That would be nice from a performance standpoint. I did not do that myself because hashPrefix would have to be set before ui-router is injected, and I'm not familiar enough with ui-router's codebase to understand the fix.