I tried to set up a plnkr but couldn't figure out how to get the ngRoute 
piece working to demonstrate the issue. But, this should be pretty simple 
to visualize.

Given that I have to support older IE's (8 & 9), and can't at present use 
html5Mode* for $locationProvider, I'm configuring the app thusly:
$locationProvider.html5Mode(false).hashPrefix('!');

* I know it falls back to hash bang mode transparently for older browsers. 
There was a really compelling reason we couldn't do this. And I can't 
remember what it was now.

Therefore, a typical url would be something along the lines of:
domain.com/Page#!/
domain.com/Page#!/foo
domain.com/Page#!/bar
...etc.

Well, it seems that somehow links to the page from site users are getting 
URL encoded, so the bang is becoming a %20.
domain.com/Page#%20/

Angular throws the error "missing hash prefix" (or "ihshprfx" in the 
compressed version) and then immediately rewrites the URL to have the bang 
instead of the %20. Based on my reading, this is the correct behavior - a 
url encoded bang seems to mean don't treat this like you would normally 
treat a bang, it's something else. But the question is, what is the best 
way to deal with this? We have a global exception handler for logging 
exceptions from the client and giving the user information on how to 
recover from errors. Well, currently we are just eating this error and 
letting the browser keep going. This seems to be working fine, but seems 
like bad practice. Real problems could be occurring that we are not logging.

So, this is rather open-ended, but what advice does the Angular community 
have on the right way to deal with this? Or is the right answer to just 
ignore if for a year until we feel comfortable dropping support for IE 8/9 
and then switching to html5Mode?

Thanks for your help and advice!

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to