unbind
can.Model.prototype.unbind
Stop listening to events on this Model.
model.unbind(eventName[, handler])
Parameters
-
eventName
{String}
The event to unbind from.
-
handler
{function()}
OptionalA handler previously bound with
bind
. If handler is not passed,unbind
will remove all handlers for the given event.
Returns
{can.Model}
The Model, for chaining.
unbind(eventName, handler)
removes a listener attached with bind.You have to pass the same function to
unbind
that you passed tobind
.Unbind will also remove the instance from the store if there are no other listeners.