SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template
生活随笔
收集整理的這篇文章主要介紹了
SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
頁面如下:
http://localhost:4200/powertools-spa/en/USD/jerryproduct/3881018/Angle%20Grinder%20RT-AG%20115
template id 為:ProductDetailsPageTemplate
在 product detail page module 里,我們調用 RouterModule.forChild, 指定路由匹配后,加載的 Component 為 PageLayoutComponent:
我在這個 Component 的 html 文件里,增添一條 div 語句作為打印輸出:
運行時效果:
這個 ProductDetailsPageTemplate 出現在 router-outlet 指令下面,顯然是通過路由加載的:
在 layout config 配置文件里,可以將其 slots 刪除一部分做一個測試:
比如只剩 Summary slot:
效果如下:
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的SAP 电商云 Spartacus UI 产品明细页面路由确定后,加载的是 page template的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: AI 语音诈骗日益猖獗:实现 95% 模
- 下一篇: 4倍降温吹凉风!小米米家智能蒸发式冷风扇