(1) 使用命令行创建一个新的Angular Component:

banner Component的实现:

通过构造函数参数注入cms Component data.
而Component的html实现,只是简单的显示一行字符串:This is a custom banner component

(2) 在Custom Module实现里,使用第一个步骤创建的CustomBannerComponent替换原始的cmsComponent:

最后运行时的效果如下:

(1) 使用命令行创建一个新的Angular Component:
banner Component的实现:
通过构造函数参数注入cms Component data.
而Component的html实现,只是简单的显示一行字符串:This is a custom banner component
(2) 在Custom Module实现里,使用第一个步骤创建的CustomBannerComponent替换原始的cmsComponent:
最后运行时的效果如下:
本文标题:SAP Spartacus自定义Component的使用
本文链接:https://www.haomeiwen.com/subject/ydivsktx.html
网友评论