Exam B2B-Commerce-Developer Topic 1 Question 115 Discussion

Actual exam question for Salesforce's B2B-Commerce-Developer exam
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?

by Zachary at Dec 27, 2023, 05:47 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

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.

0
0
0
10