Create a new Angular Component using the command line:
Implementation of the banner Component:
Inject CMS Component data with constructor arguments.
The HTML implementation of Component simply displays a string: This is a Custom Banner Component
(2) In the Custom Module implementation, replace the original cmsComponent with the CustomBannerComponent created in the first step:
The final runtime looks like this:
For more of Jerry’s original articles, please follow the public account “Wang Zixi “: