Exam B2B-Commerce-Developer Topic 1 Question 115 Discussion
Actual exam question for Salesforce's B2B-Commerce-Developer exam
Question #: 115
Topic #: 1
Question #: 115
Topic #: 1
Which element can be used to pass HTML from a parent component to a child component? 03m 19s
Suggested Answer: D Vote an answer
Explanation
To pass HTML from a parent component to a child component, the child component needs to have a <slot></slot> 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?
To pass HTML from a parent component to a child component, the child component needs to have a <slot></slot> 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?
by Zachary at Dec 27, 2023, 05:47 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).