How to register, fire and handle a component and application event?



How to register, fire and handle a component and application event?..

Answer / Priyanka Pethe

To register an event in a Lightning component, use the $A.getCallback() function or the $A.* syntax. To fire an event, use $A.get('e.c:eventName').fire(). To handle an event, create an event handler method and use $A.getCallback() to execute it when the event is fired.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

How to get the userid of all the currently logged in users using apex code?

1 Answers  


What are the different ways to store various types of records in salesforce?

1 Answers  


Mention what is the difference between soql and sosl?

1 Answers  


How much does a Salesforce license cost?

1 Answers  


How many custom fields can I created in an object? : salesforce admin

1 Answers  


Explain the skinny table. What are the considerations for skinny table?

1 Answers  


Are there any css (styles) provided by salesforce.com as part of the supported lightning components ? : salesforce lightning component

1 Answers  


What is the use of implements in lightning component?

1 Answers  


Difference between soql vs sosl in salesforce?

1 Answers  


What is the purpose of <script> tags? : salesforce visualforce

1 Answers  


What is the use of the database class in apex ?

1 Answers  


Compare Jump Start Wizard vs. Standard Wizard?

1 Answers  


Categories