SAP Spartacus page slot里的Component,对应的DOM节点是如何插入到DOM tree里的
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus page slot里的Component,对应的DOM节点是如何插入到DOM tree里的
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
例子:我新建了一個AppComponent,映射到了ManageCostCentersListComponent:
運行時的效果:
這個AppComponent對應的app-root是如何被添加到DOM tree里的呢?
Component渲染的起點是component-wrapper.directive.ts的launchComponent方法:
createComponent里的insert操作,最后會導致剛剛創建出來的Component對應的dom節點添加到dom tree里:
nativeInsertBefore:
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的SAP Spartacus page slot里的Component,对应的DOM节点是如何插入到DOM tree里的的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP Spartacus Cost C
- 下一篇: SAP Spartacus cost c