You need to sign in to do that
Don't have an account?
Avinash A
hi, I am trying to print a toast message in lightning component ,but i am getting an error, Please help me resolving this issue
<!-- this is the component --> <lightning:button label="Success" onclick="{!c.handleClick}"/> //Client side JS handleClick : function(component, event, helper) { var toastEvent = $A.get("e.force:showToast"); toastEvent.setParams({ "title": "The toast pops up", "message": "Toast event fired", "mode": "sticky", "type": "other", }); toastEvent.fire(); }
Avinash A
Paul Grice 20
You don't need a comma after the final parameter in the .setParams( { } ); Have you tried it without?