以 library 方式启动的 SAP Spartacus Storefront,如何手动实现 User 模块的延迟加载
首先了解 SAP Spartacus Storefront 是如何导入 feature module 的。本文写作版本:Spartacus-core:3.4.1
AppModule->SpartacusModule:
SpartacusModule-> SpartacusFeaturesModule:
所以,在 SpartacusFeaturesModule 里,导入所有需要的 feature module:
在一个正常工作的 Storefront 里,查看 Account/User 对应的 module 名称为:UserFeatureModule
因此,将 UserFeatureModule 导入,同时观察到,UserFeatureModule 里对 UserProfileModule 和 UserAccountModule 这两个 module 进行了延迟加载:
因此,在 AppModule 里就不应该对这两个 module 实现静态导入,以免破坏 module 的延迟加载机制。
更多Jerry的原创文章,尽在:“汪子熙”:
以 library 方式启动的 SAP Spartacus Storefront,如何手动实现 User 模块的延迟加载相关推荐
- Debug a Server–Side Rendered SAP Spartacus Storefront Using Chrome Dev Tools
In SAP Spartacus document there is a page for "How to Debug a Server–Side Rendered Storefront&q ...
- SAP Spartacus storefront 模块的实现位置
Angular应用里最终渲染出来原生HTML dom元素,全部都是Angular的core.js里的代码实现的: 往cx-storefront里插入子节点: 子节点内容: 路径:https://git ...
- 如何给 SAP Spartacus Storefront 创建新的页面
page template 不包含 layout 或者 design information. content slot 在页面上的具体位置,以及 layout 和 design 的选择,必须在前端指 ...
- 如何在 SAP Commerce Cloud Portal 构建和部署 SAP Spartacus Storefront
Commerce Cloud portal: CCV2 部署包含构建和部署两个子步骤. 首先登录 cloud portal,创建一个新 build: 点击 create 按钮: 输入构建的名称和托管要 ...
- SAP Spartacus storefront.component.html 怎么关联到其他的页面
storefront怎么关联到其他的页面? 下图是storefront.component.html的源代码,里面使用自定义Component cx-page-layout和cx-page-slot, ...
- SAP Spartacus storefront.component.html 里的 SkipLinkComponent 如何创建的
源代码: 现在cxOutlet的值是字符串cx-storefront: 运行时触发ngOnChanges hook: 然后之行到 cx-header 的 outlet 解析: 从注释看,render方 ...
- 如何使用schematics快速创建全新的SAP Spartacus Storefront并启用SSR
SSR 测试要点 I checked once again version 2.1.0 of spartacus. Everything works correctly in spartacus in ...
- SAP Spartacus Storefront 页面 cx-page-layout 的赋值逻辑
分别是header,navigation和footer: 对应的 Component 实现里,有对应的 set 方法: section$ 是一个 BehaviorSubject. 其中每个sectio ...
- SAP Spartacus Storefront页面的page layout config
在page-layout.service.ts里的getPageFoldSlot方法设置断点: 在this.config里即可获得所有的配置信息.其中和layout相关的breakpoints: la ...
最新文章
- windos 为什么会突然服务停止了_Windows服务异常自动关闭
- (11.06)Java小知识
- PHP网站使用JavaScript和Iframe简单实现部分刷新效果
- 使用Activator.CreateInstance完善简单工厂
- Linux Shell中各种分号和括号的用法总结
- centos php ssl,CentOS下在Nginx中添加SSL证书以支持HTTPS协议访问
- ubuntu14.04如何更换阿里云源
- HDU2035 人见人爱A^B【快速模幂】
- 华为系列设备优先级总结(一)
- PHP-----文件系统的交互
- linux 两个mysql_Linux 安装两个MySQL
- 推动区块链基础设施建设,先要破解区块链发展“三高”难题
- TX2与PCA9685驱动舵机(RACECAR)
- python if any_python条件判断 all(),any()
- C语言如何打印扑克牌花色(红桃、梅花、黑桃、方片)
- proxy 配置报错 Error occured while trying to proxy to:
- 数据结构与算法_01_复杂度分析
- 橘子识别java_Java方法
- java获取北京时间系统时间全球各地时间。
- PLSQL入门与精通(第72章:LOGOFF触发器)