【问题标题】:Lazy Loading Custom module in Spartacus 3.3.0 not workingSpartacus 3.3.0 中的延迟加载自定义模块不起作用
【发布时间】:2021-06-25 11:54:27
【问题描述】:

尝试延迟加载我的自定义功能模块之一。它会创建块但不会在浏览器中懒惰地工作。它在第一次加载。请建议我在这里缺少什么...

【问题讨论】:

  • 大家好,有更新吗?
  • 为什么你的路径有下划线?

标签: spartacus-storefront


【解决方案1】:

根据创建块的事实,您似乎缺少 cmsComponents 数组。

您需要列出延迟加载模块中存在的 CMS 组件,这样 Spartacus 就会知道何时加载该块。请参阅https://angular.io/guide/router#getting-route-information 以及我提出的一个快速示例https://github.com/LTiger14/custom-style-spartacus/blob/main/src/app/app.module.ts#L26-L33

【讨论】:

    猜你喜欢
    • 2018-11-22
    • 2018-08-06
    • 1970-01-01
    • 2017-02-22
    • 1970-01-01
    • 2018-05-22
    • 1970-01-01
    • 2019-09-27
    • 1970-01-01
    相关资源
    最近更新 更多