我是角度新手,使用角度 10。
在“app-routing.module.ts”中,我可以看到下面的配置以在 url 中启用“#”
imports: [ RouterModule.forRoot(routes, { useHash: true }) ]
问题: 如果我通过开发服务器(4200 端口)上的 vs 代码运行应用程序,那么它将 URL“http://localhost:8081/auth”重定向到“http://localhost:8081/#/auth”,页面为加载成功。
但是如果我通过 intellij(端口 8080)作为 springboot 应用程序运行应用程序,那么它会重定向到带有 404 的“http://localhost:8081/auth”
谁能帮忙解决这个问题?