sails.js - Configure sailsjs to redirect unknown routes as /#/path for angularjs when html5 mode is true -
i'm using sailjs angularjs routing , need html5 mode true, hard page load except /index.html generates 404 error. in non-sailsjs case when using plain nodejs, add in routes re-write not matched existing routes /#/route
on index.html. not know how in sailsjs.
in regular node.js, like:
app.get('*', function (req, res) { return res.redirect('/#' + req.path); });
Comments
Post a Comment