1

Angular's built-in jqLite doesn't support namespace for unbind/off. So If I use unbind/off its completely wipes out all the events attached to an element.

How do I unbind/off the specific event handler from an event in angularjs?

1 Answer 1

1

var listnerFn = function (){} // listener function. angular.element(el).on('click', listenerFn) // event registration. angular.element(el).off('click', listenerFn) // event de registration.


where el is the element reference on which events need to be registered.

Sign up to request clarification or add additional context in comments.

1 Comment

Why the downvote? This is correct and is the way to unbind a specific event handler from a specific event. While it's true that jqLite doesn't support namespaces, this doesn't use namespaces. A namespace would be click.myNamespace or just .myNamespace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.