I have an angular 4 application and I have 2 components a timeline and a modal dialog. When I double click on the timeline I want to open the modal dialog with the datas passed into the double click function.
So, in the timeline.component.ts, I have :
Timeline.prototype.onTaskDoubleClick = function(task){
console.log("Double click on task" + task.id);
console.log(task);
$('#addProjectForm').click();
}
How can I do to pass the object 'task' from this function to the modal component ?