I have a scenario that I have an event called AdviceEvent registered by two different components ParentCmp and FriendCmp. And Third component called PersonCmp is handling both event.

The Question is if both ParentCmp and FriendCmp fire the same event at same time. at that situation PersonCmp should only listen to ParentCmp's event.

And how can we identify from which component that event has been fired?

Thanks in advance :)

1 Answer 1


One way is to use a string attribute in the event and set its value fired from ParentCmp when firing from ParentCmp and fired from FriendCmp when fired from FriendCmp and in the listener object you can check the string value to know where is it fired from.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .