Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 部署失败时的角度6路由_Angular - Fatal编程技术网

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的基本设置