When we work with events it's absolutely necessary that we send data along with the event, I mean, if it's not for sending the data why would we even need events in the first place?
So by now, we have a hang of how to fire the events, so now, let's look at how to send the data in events.
The syntax is not going to change a lot just because we need to send data, there will be a config object that we need to tinker around to send the data to the parent or containing component.
Here is a snippet of the code demonstrating it!
Just a heads up it's not
details its just
This is the parent or containing component.
Here is the controller file in the parent component.
Hope this helps!