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

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

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

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -