Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Created September 19, 2018 23:45
Show Gist options
  • Save choudharymanish8585/a70d7b77f7e763b4073a64e761da316d to your computer and use it in GitHub Desktop.
Save choudharymanish8585/a70d7b77f7e763b4073a64e761da316d to your computer and use it in GitHub Desktop.
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" >
<!--Include EmpApiDemo child component and pass channel name to subscribe
ex: "/topic/AccountSpy" is my pushtopic channel name
once the event is fired, it will handled in handleMessage controller method -->
<c:EmpApiDemo channelName="/topic/AccountSpy" onEmpEvent="{!c.handleMessage}" />
<!-- lightning card to display detail -->
<lightning:card footer="This component displays account changes using lightning:empApi component"
title="Account Spy"
iconName="standard:search">
<div id="output">
</div>
</lightning:card>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment