I am trying to call a method which is in app.component.ts from a another component on some click event
app.component.ts having a method
getData(data){
console.log(data)
}
Another component: on click event trying to call getdata()
sendData(data){
getData(data) // need to pass some data to that component
}
Tried: Added app.component in the other component and able to call the method but gettting a circular dependency error.