Conditional Rendering using if truefalse directive in Lightning Web Component in Salesforce

preview_player
Показать описание
Conditional Rendering

If we want to hide some of the components from the HTML and show them based on conditions then we can use conditional rendering.

To render a DOM element in a template only when certain conditions are met, we use conditional rendering.

Like Aura Components Aura: if, apex (if, else) the same way we have a template if: true and template if: false in Lightning web component.

= If the value of the if:true expression changes and evaluates to false, all the components inside the template if: true= {} tag are destroyed. The components are created again if the if: true expression changes again and evaluates to true.

= If the value of the if: false expression changes and evaluates to true, all the components inside the template if:false= {} tag are destroyed. The components are created again if the if: false expression changes again and evaluates to false.

Thanks.
Рекомендации по теме
Комментарии
Автор

За что это все??? Столько лет копить деньги, а теперь они ничего не стоят!

evacole