ng-docs.github.io icon indicating copy to clipboard operation
ng-docs.github.io copied to clipboard

路由策略

Open Paul-Yellow opened this issue 4 years ago • 1 comments

问题: 开发环境中路由是history模式,但是打包到生产环境中路由竟然成了hash的模式。但是angular模式 默认的是history模式啊,为什么到了线上成了hash了呢?我看了Nginx的配置是最基础的配置,没有针对history模式路由进行配置。但是问题是应该404 不应该直接是hash的模式啊?是不是我少配置了什么东西了?

版本: angular9 ng-zorro

Paul-Yellow avatar Jun 19 '20 11:06 Paul-Yellow

可以在stackblitz上代码...最小化的那种 或者手动强制指定一次?https://angular.cn/guide/router#locationstrategy-and-browser-url-styles

wszgrcy avatar Jun 22 '20 13:06 wszgrcy