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
queueis provided, all handlers will be removed. - queue
{String}:The can-queues queue this event handler should be removed from.
If a
handleris provided and noqueueis provided, thequeuewill default to"mutate".If a
handleris not provided, but aqueueis provided, all handlers for the provided queue will be removed.