Angular 部署失败时的角度6路由
在本地,我使用Angular 部署失败时的角度6路由,angular,Angular,在本地,我使用ng service--base href”/grant运行解决方案,我的网站和路由工作正常。当我部署并通过构建运行ng build--base href/grant/时,输出的网站在没有/grant/添加的情况下有不正确的链接路由。我还尝试了ng build--base href“/不成功地授予 我的路线: const routes: Routes = [ { path: '', component: SetupComponent }, {
ng service--base href”/grant运行解决方案,我的网站和路由工作正常。当我部署并通过构建运行ng build--base href/grant/
时,输出的网站在没有/grant/添加的情况下有不正确的链接路由。我还尝试了ng build--base href“/不成功地授予
我的路线:
const routes: Routes = [
{
path: '',
component: SetupComponent
},
{
path: 'new-login',
component: NewLoginComponent
}
但应用程序是否在该地址加载?您的build命令看起来不错,您确定它不是宿主吗?不要认为它是宿主iis的基本设置