Newer Version Available
ltng:sendMessage
Passes a message between two components.
To send a message, specify a string of text that you want to pass between components.
Optionally, specify a channel for this event so that your components can select if they want to
listen to particular event
messages
1sendMsg: function(component, event) {
2 var sendMsgEvent = $A.get("e.ltng:sendMessage");
3 sendMsgEvent.setParams({
4 "message": "Hello World",
5 "channel": "AccountsChannel"
6 });
7 sendMsgEvent.fire();
8}| Attribute Name | Type | Description |
|---|---|---|
| message | String | Required. The text that you want to pass between components. |
| channel | String | Specify this field if you want particular components to process some event messages while ignoring others. |