I am working with the following event handler:
eventClicked(event) {
alert(JSON.stringify(event));
}
I am trying to figure out what is difference between using .bind(this)
and not binding the this
context in the above event handler.
I have tried both approaches and they both yield the same result. So, why we use .bind(this)
?