Posts

Showing posts from August, 2020

Showing Apex Error on UI for Lightning WebComponents(lwc)

Image
 Template: <template>      <lightning-card   title = "Showing error From Apex" >          <lightning-button   label = "Get Contacts"   onclick = {handleGetContacts} ></lightning-button>                   <template   if:true = {error} >              <c-error-panel   errors = {error} ></c-error-panel>          </template>      </lightning-card> </template> Js:      import  {  LightningElement , wire  }  from   'lwc' ; //importing from apex import  srchval  from   '@salesforce/apex/showErrorMsg.showError' ; export default   class   ShowErrorfromApex ...