Working with Ember JS version 2.12.0
I've developed a component that triggers an action on click and receives specific data. Now, I'm faced with the challenge of passing this data to another component. Is there a method for achieving this as the documentation does not appear to address it?
This snippet shows my component template:
<div class="play-button" {{action "playTrack" track}}>
<span class="glyphicon glyphicon-play" aria-hidden="true"></span>
</div>
And the associated component JavaScript code:
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
playTrack(track){
console.log(track);
}
}
});
Is there a recommended approach to passing the track object into another component?