Angular 中的问题(仅在生产模式下)
Problem with in Angular (only in prod mode)
如果我在浏览器https://beeidea.com.br/, it is redirected without problems to https://beeidea.com.br/home. However, if I type https://beeidea.com.br/home地址栏中通知,显示代码404
有什么想法吗?
您需要 return index.html 服务器上的文件。
类似于:
this.expressApp.get("/*", function (req, res, next) {
return res.sendFile(clientFolder + '/index.html');
})
如果我在浏览器https://beeidea.com.br/, it is redirected without problems to https://beeidea.com.br/home. However, if I type https://beeidea.com.br/home地址栏中通知,显示代码404
有什么想法吗?
您需要 return index.html 服务器上的文件。 类似于:
this.expressApp.get("/*", function (req, res, next) {
return res.sendFile(clientFolder + '/index.html');
})