I’ve been trying to use Node and Express with Angular’s
html5Mode enabled. I keep running into problems.
Here is the first one: http://stackoverflow.com/questions/31327439/angular-routing-in-html5mode-with-node-js
And here is the latest one: http://stackoverflow.com/questions/32044247/node-express-gives-two-responses-breaks-front-end-script
In short, I am currently trying to detect Facebook’s user agent and reroute the traffic. I enabled html5Mode so I could route the URL’s properly without the hashtag (
#) being in the URL. But some errors occur depending on how this is configured, such as the page saying
Cannot GET /.../... when I refresh the page, or the page loading twice which breaks Mixpanel and the site.