I still have this problem, actually I got to handle this using a little hack before AngularJS
var location = window.location.href; var index = location.indexOf('#'); if (index > 0 && window.location.pathname == "/") { window.lastHash = window.location.hash; window.location.hash = "!"; } But now I'm using jQuery.mmenu <http://mmenu.frebsite.nl/> and it's menu items or main trigger use anchor links , I could bind an event trough jQuery but it seems very bad to do something that html does natively but AngularJS is breaking. How did you solve your problem ? On Monday, January 28, 2013 8:20:56 AM UTC-5, Dario Gieselaar wrote: > > Hi all, > > I'm running into an issue with Angular (1.0.4) and its URL > handling/rewriting. I'm currently implementing Angular components in a > pretty big application with a lot of legacy (JQuery-based) Javascript. For > example, it uses anchors to provide deeplinks to tabs. However, Angular > rewrites these anchors, appending '/'. So #anchor gets rewritten to > #/anchor. I can prevent this rewriting by configuring a hashPrefix ('!'), > but this results in the following error: > > Error: Invalid url "url#anchor", missing hash prefix "!" ! at Error > (<anonymous>) at Object.LocationHashbangUrl.$$parse > (/js/angular.js:5058:13) at Object.LocationHashbangUrl > (/js/angular.js:5097:8) at $LocationProvider.$get (/js/angular.js:5423:19) > at Object.invoke (/js/angular.js:2820:28) at /js/angular.js:2658:37 at > getService (/js/angular.js:2780:39) at Object.invoke > (/js/angular.js:2798:13) at /js/angular.js:2658:37 at getService > (/js/angular.js:2780:39) > > At which point I'm lost. Is there any way to prevent AngularJS from > rewriting URLs? > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.