routes.js
app.route('/*')
.get(indexController.render);
indexController.js
exports.render=function(req, res){
res.render('index');
}
config.js
$locationProvider.html5Mode(true);
我正在尝试在我的平均应用程序中实现 html5 模式。这不起作用。有什么问题吗
最佳答案
exports.render=function(req, res){
//Your path to the html with .html
res.render('index.html');
}
关于javascript - Mean stack 中的 Angular html5 模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34756736/