ExamGecko
Question list
Search
Search

List of questions

Search

Question 227 - Certified B2B Commerce Administrator discussion

Report
Export

Which template will correctly display the details message only when areDetailsVisible becomes true given the following code in a Lightning Web Component?

A)

B)

C)

D)

A.
Option A
Answers
A.
Option A
B.
Option B
Answers
B.
Option B
C.
Option C
Answers
C.
Option C
D.
Option D
Answers
D.
Option D
Suggested answer: B

Explanation:

Option B is the correct template to display the details message only when areDetailsVisible becomes true. This is because Option B uses the if:true directive on a nested <template> tag that encloses the conditional content.The if:true directive binds data to the template and removes and inserts DOM elements based on whether the data is a truthy or falsy value1.Option A, C, and D are incorrect because they do not use the if:true directive on a nested <template> tag, and therefore will not render the content conditionally.Reference:1: Render HTML Conditionally - Trailhead2

asked 23/09/2024
Lucas Kenji Mizuguchi Martins
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first