Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.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
Routing 角度延迟加载的模块子路由在页面重新加载/刷新时不起作用_Routing_Lazy Loading_Page Refresh_Angular8 - Fatal编程技术网

Routing 角度延迟加载的模块子路由在页面重新加载/刷新时不起作用

Routing 角度延迟加载的模块子路由在页面重新加载/刷新时不起作用,routing,lazy-loading,page-refresh,angular8,Routing,Lazy Loading,Page Refresh,Angular8,我的angular应用程序中有多个延迟加载模块,尝试使用子路由,但无法重新加载/刷新页面 在单击功能时工作正常,导航到预期组件,但在页面刷新时,它不适用于localhost:4200/port move/overview localhost:4200/overview-这在刷新时起作用。在这里,它可以被更正为用于进近->本地主机:4200/端口移动/概览。有人能帮忙吗 主路由模块中的路由(app routing.module.ts): 端口移动中的路由/(惰性模块之一): 单击“功能”导航到端口

我的angular应用程序中有多个延迟加载模块,尝试使用子路由,但无法重新加载/刷新页面

在单击功能时工作正常,导航到预期组件,但在页面刷新时,它不适用于localhost:4200/port move/overview

localhost:4200/overview-这在刷新时起作用。在这里,它可以被更正为用于进近->本地主机:4200/端口移动/概览。有人能帮忙吗

主路由模块中的路由(app routing.module.ts):

端口移动中的路由/(惰性模块之一):

单击“功能”导航到端口移动概览组件,其中端口移动为父级,概览为子级

//导航到端口移动概述

   navigateTo() {
        this.router.navigateByUrl('/port-move/overview');
    }

将base href更改为
会导致此问题!使用


谢谢。

对此有任何解决方案吗?将base href更改为导致此问题。换句话说,将base href更改为
const routes: Routes = [
    { path: '', component: PortMoveComponent },
    { path: 'overview', component: PortMoveOverviewComponent }
]
   navigateTo() {
        this.router.navigateByUrl('/port-move/overview');
    }