SAP Spartacus Component-wrapper.directive.ts launch Component的三个参数
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus Component-wrapper.directive.ts launch Component的三个参数
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
拿到Component mapping后,使用subscribe fire this.launchComponent這個方法:
launcher的三個輸入參數:
- componentMapping
- viewContainerRef
- elementInjector
首先根據injector和Component類型(字符串)拿到Component factory:
再使用viewContainerRef創建Component:
將創建好的Component ref通過next傳遞給下一個subscription(subscribe方法內部的next方法):
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的SAP Spartacus Component-wrapper.directive.ts launch Component的三个参数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 约单软件怎么找特服 找特服的方法
- 下一篇: 华为P60系列机型推送更新:优化拍摄体验