Ad

Angular Html5 Mode In Mean Stack

routes.js

app.route('/*')
    .get(indexController.render);

indexController.js

exports.render=function(req, res){

        res.render('index');

    }

config.js

$locationProvider.html5Mode(true);

I am trying to implement html5 mode in my mean application. This did not work. Anything wrong in this

Ad

Answer

exports.render=function(req, res){
    //Your path to the html with .html
    res.render('index.html');
}
Ad
source: stackoverflow.com
Ad