角度6中的嵌套路由无法正常工作

时间:2018-06-25 13:51:17

标签: angular nginx angular6

我正在尝试所有可能的解决方案,但似乎无济于事。

我们的项目使用 nginx 路由到其他模块。我的是 supportui

index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">

    <base href="./">

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
  </head>
  <body>
    <app-root>Loading...</app-root>
  </body>
</html>

现在当url为/supportui/supportui/route1时->一切正常,因为所有启动JS都是从所需路径 supportui 下载的 when things work fine

现在,当url为/supportui/route1/route2->基数变为supportui/route1时,所有必需的JS都会尝试从supportui/route1加载,因为该不存在,因此应用程序崩溃了。

it crashes

0 个答案:

没有答案
相关问题