美文网首页SAP
使用ng-container标签在SAP Spartacus里插

使用ng-container标签在SAP Spartacus里插

作者: _扫地僧_ | 来源:发表于2020-11-26 10:30 被阅读0次
    <p>before</p>
    <ng-container [cxComponentWrapper]="componentMeta"></ng-container>
    <p>afer</p>
    

    componentMeta定义在app Component里:

    运行时生成的cx-banner标签:

    如果在代码里将标准的banner替换成自定义banner,即:


    那么在运行时,SAP Spartacus会使用自定义banner来渲染:

    Component的创建过程:

    cmsData的读取方式:



    最后通过ng-container成功添加到UI上的Component:

    相关文章

      网友评论

        本文标题:使用ng-container标签在SAP Spartacus里插

        本文链接:https://www.haomeiwen.com/subject/jawyektx.html