I wanted to know if it is possible to pass a function through the two way data bind of the angle. I'll try to explain, I have a 3-button component and would like to use them in several parts of my project. I wanted to pass the functions to the buttons to run, I'll try to give an example.
component where I want to implement my buttons:
<div>
<component-btns [(botao1)]="funcao1" [(botao2)]="funcao2" [(botao3)]="funcao3"><component-btns>
</div>
These functions will be received in my component-btns
and referenced to the buttons in my html.
If I run the functions and ask for a console.log(this)
what will be printed is the this
of my component-btns
and not the this
that I used to implement and pass the functions to my component-btns
.
It's pretty confusing what I want to do, I wonder if it's possible to do something like this?