Getting event attributes from a handled event

To extract event values, the code snippet is as follows:

{
 handleApplicationEvent : function(component, event) {
  var message = event.getParam("message");} 

Note the use of event.getParam(), to extract the parameter from the attributes of the fired event.

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.