SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template
文章目录
页面如下:
http://localhost:4200/powerto...
template id 为:ProductDetailsPageTemplate
在 product detail page module 里,我们调用 RouterModule.forChild, 指定路由匹配后,加载的 Component 为 PageLayoutComponent:

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

运行时效果:

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

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

比如只剩 Summary slot:
效果如下:
更多Jerry的原创文章,尽在:"汪子熙":

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论