页面如下:
http://localhost:4200/powertools-spa/en/USD/jerryproduct/3881018/Angle Grinder RT-AG 115
SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

template id 为:ProductDetailsPageTemplate

在 product detail page module 里,我们调用 RouterModule.forChild, 指定路由匹配后,加载的 Component 为 PageLayoutComponent:

SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

我在这个 Component 的 html 文件里,增添一条 div 语句作为打印输出:

SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

运行时效果:

SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

这个 ProductDetailsPageTemplate 出现在 router-outlet 指令下面,显然是通过路由加载的:

SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

在 layout config 配置文件里,可以将其 slots 删除一部分做一个测试:

SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

比如只剩 Summary slot:
SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

效果如下:
SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

更多Jerry的原创文章,尽在:"汪子熙":
SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案