Bind
methodsAttaches a handler to an event.
Parameters:eventNameString
handlerFunction
The name of the event.
A function to execute each time the event is triggered. That function should have a single parameter which will contain any event specific data.
Important: The context (
this) of thehandlerfunction is set to the observable object itself.