2

Is there angular style to listen to clicks on elements without using ng-click.

In JQuery we can do it this:

$("div").on("click",function);
$("div").click(function);

This helps in registering click dynamically.

What is the Angular way to do this?

Re Captcha
  • 3,125
  • 2
  • 22
  • 34
Chiru
  • 67
  • 1
  • 1
  • 9
  • 2
    I think you should not do that, you should keep the controller clean from UI dependency, take a look [this post](http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background) as reference – Yuliam Chandra Aug 05 '14 at 07:35

1 Answers1

2

You can use jqLite:

angular.element(e).on('click', function($event) {...});
Michael Kang
  • 52,003
  • 16
  • 103
  • 135