off
Stop listening to changes in the observable's value.
.off( [handler [, queue='mutate']] )
Removes one or more event handler in the observable's handlers tree. If the las handler is removed, the observable's onUnbound method is called.
observable.off(function(newVal){ ... });
observable.off(function(newVal){ ... }, "notify");
observable.off();
observable.off(undefined, "mutate");
Parameters
- handler
{function(newValue, oldValue)}
:The handler to be removed. If no handler is provided and no
queue
is provided, all handlers will be removed. - queue
{String}
:The can-queues queue this event handler should be removed from.
If a
handler
is provided and noqueue
is provided, thequeue
will default to"mutate"
.If a
handler
is not provided, but aqueue
is provided, all handlers for the provided queue will be removed.