Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.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 index.html文件路径错误_Angular - Fatal编程技术网

Angular 角度多边形填充和其他6 index.html文件路径错误

Angular 角度多边形填充和其他6 index.html文件路径错误,angular,Angular,我在IIS上部署angular build,我认为我的主要问题是基本问题 这是我在IIS管理器中托管Angular build的路径 其中First ClientApp是我在IIS上的应用程序 E:\IIS Projects\ElasticCoreWebAPI\u Public\feature\ClientApp\ClientApp\这是我的 这是我的index.html <!doctype html> <html lang="en"> <he

我在IIS上部署angular build,我认为我的主要问题是基本问题

这是我在IIS管理器中托管Angular build的路径

其中First ClientApp是我在IIS上的应用程序

E:\IIS Projects\ElasticCoreWebAPI\u Public\feature\ClientApp\ClientApp\
这是我的

这是我的index.html


<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>KEENU CFRS</title>
  <base href="/ClientApp">
  <!--// "build": "ng build --base-href=/CFRS.WebUI/",-->

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography">
  <app-root>
      <div class="main-spinner-wrapper">
        <div class="donut"></div>
      </div>
  </app-root>
</body>
</html>
<base href="/">
这是我的生成发布命令

ng build--prod--base href/ClientApp/

这就是Build要去的地方

  "options": {
            "outputPath": "dist",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
我在dist得到了我的身材

这是我构建的输出图片

我通过给出部署构建的服务器地址解决了这个问题,如果构建部署在根文件夹中,那么在index.html中


<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>KEENU CFRS</title>
  <base href="/ClientApp">
  <!--// "build": "ng build --base-href=/CFRS.WebUI/",-->

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography">
  <app-root>
      <div class="main-spinner-wrapper">
        <div class="donut"></div>
      </div>
  </app-root>
</body>
</html>
<base href="/">
如果网站部署在应用程序的物理文件夹中,则

ng build --prod --base-href /WebSiteAddress/
ng build --prod --base-href /WebSiteAddress/