我有一个应用程序,在服务器上保留了成功生产构建后得到的dist文件夹。所有模块和组件都运行良好,直到我手动重新加载浏览器窗口时,它会抛出以下错误。同时,我使用base-href -- /dist/ 构建项目。
Object not found!
The requested URL was not found on this server. If you entered the URL
manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
useHash
?建议配置服务器而不是使用HashLocationStrategy
。 - Ankit SharmaHashLocationStrategy
,请查看https://angular.io/guide/deployment#server-configuration。 - Ash