So right now I have configured html5mode.
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
This is end of my middelware for express to support html5mode
app.use(function (req, res) {
if (!req.path.match('/calendar|/user|/create|/profile')) {
return res.send(404);
}
res.render('home/index', {
currentUser: req.user
});
});
And all my urls are working good in Chrome and Firefox 3.6(which I'm using to test hashbang fallback).
My only issue is with the logout route. My logout is a server interaction. So I did this.
$rootScope.logout = function () {
window.location = '/logout';
};
And made an ng-click to this function and that worked for logging out in Chrome. How would I go about doing this in the hashbang fallback mode? It's not working in Firefox 3.6. Thanks!