Posts

Showing posts from April, 2020

ToastMessage

 showInfoToast : function(component, event, helper) {         var toastEvent = $A.get("e.force:showToast");         toastEvent.setParams({             title : 'Info Message',             message: 'Mode is dismissible ,duration is 5sec and this is normal Message',             messageTemplate: 'Record {0} created! See it {1}!',             duration:' 5000',             key: 'info_alt',             type: 'info',             mode: 'dismissible'         });         toastEvent.fire();     },     showSuccessToast : function(component, event, helper) {         var toastEvent = $A.get("e.force:showToast");         toastEvent.setPar...

Comparing Two Values Using Aura If

<aura:application >     <aura:attribute name="items" type="List" default="[1,2,3]" />     <aura:attribute name="current" type="Integer" default="2" />     <aura:iteration items="{!v.items}" var="item">         <aura:if isTrue="{!v.current == item}">             <div>Current: {!item}</div>             <aura:set attribute="else">                 <div>Not Current: {!item}</div>             </aura:set>         </aura:if>     </aura:iteration> </aura:application> Output Not Current: 1 Current: 2 Not Current: 3