Posts

Showing posts from August, 2019

If else condition in Lightning web component

  basic.html  ----------  //starting tag of the html file.Template tag is mandatory in Lightning web component.  <template>     <lightning-input type="checkbox" label="check" onchange={clickMe}>     </lightning-input> //boolVal is the boolean variable.It will accept only two values(true,false). //If block.If block will be executed when the boolean value is set to true.Since we are setting it to false //so by default if block will  disappear on loading of a page.     <template if:true={boolVal}>       <lightning-input label="FirstName"  type="text" placeholder="Enter the FirstName"></lightning-input>       <lightning-input label="LastName"  type="text" placeholder="Enter the LastName"></lightning-input>       <lightning-input label="Email" type="Email" placeholder="Please enter the Email"></lightning-inp