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,120
  • 2
  • 21
  • 34
  • 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) {...});
pixelbits
  • 50,631
  • 15
  • 93
  • 132