Hi I am new to LWC world & its syntax. I wanted to ask, if LWC supports multiple condition in a single statement?
Ex:
<template if:true={condition1 == 'value1' && condition2 == 'value2'}></template>
Getting Error on using multiple conditions on single line statement.
or should go for below approach
html - <template if:true={validateCondition}></template>
class js file - get validateCondition() { return (condition1 == 'value1' && condition2 == 'value2');}
Or have to use nested conditions
<template if:true={condition1 == 'value1'}>
<template if:true={condition2 == 'value2'}>
</template>
</template>
Current using above statement