function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nethra RaghupathyNethra Raghupathy 

Communication between 2 lightning components

Hi,

We have a side bar. On click of navigation link in side bar, it should navigate between 2 lightning components (which are already created). This should work for both classic and lightning. Is there a way to do it?
VishnuZVishnuZ
One way is to use lightning out application. You can also acheive it by invoking window.postMessage() JavaScript API in the caller (LC/VF), the listener component(LC/VF) subscribes to the event using addEventListner.