To pass HTML from a parent component to a child component, the child component needs to have a element in its template. A slot is a placeholder for markup that a parent component passes into a component’s body. Slots are part of the Web Component specification. The parent component can use the slot name or the default slot to specify which HTML content goes into which slot of the child component. The other options are not valid elements for passing HTML from parent to child. References:
Slots
Pass HTML Markup From Parent TO CHILD In Lightning Web Component
How parent component pass HTML to child component in Angular?
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit