Angular lazyloaded component error Error: Cannot find 'default'

Angular lazyloaded component error Error: Cannot find 'default'

我已经在生产模式下通过 azure devops 部署了一个 angular 应用程序。但是当想要去任何延迟加载的组件时,它会给出错误

    ERROR Error: Uncaught (in promise): Error: Cannot find 'default' in 
    './problem/problem.module'
    Error: Cannot find 'default' in './problem/problem.module'

请注意,如果我在没有 index.html 的情况下重新加载任何页面,则会出现错误:

    The resource you are looking for has been removed, had its name 
    changed, or is temporarily unavailable.

网站是:https://tritronfront.azurewebsites.net/ 要产生错误,您必须单击导航栏上的问题菜单。

我的懒加载路由代码是

    { path: 'admin', loadChildren: './admin/admin.module'},
    { path: 'problem', loadChildren: './problem/problem.module'}

模块代码为

    export default class ProblemModule { }

直接说:

export class ProblemModule { }

你还要补充一件事:

{ path: 'problem', loadChildren: './problem/problem.module#ProblemModule'}

官方文档里有这个 https://angular.io/docs/ts/latest/guide/router.html