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

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -