Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'll start by saying I'm just learning about AngularJS, and I was reading this article, which seems to advocate for obtrusive JavaScript as the right thing:

http://www.ng-newsletter.com/posts/angular-for-the-jquery-developer.html

My understanding is that unobtrusive JavaScript is generally considered "the right thing" (which is perhaps debatable, but outside the scope of my question). But I was wondering if there is a particular feature of AngularJS that requires event bindings be specified via attributes like ng-click? Is there a way to use AngularJS and NOT use inline event bindings?

For reference: Obtrusive JavaScript generally refers to having your JavaScript ties in the HTML itself. Unobtrusive JavaScript refers to using JavaScript or other means to programmatically apply code behaviors to the DOM rather than the plain-text markup having references to JavaScript.

share|improve this question
    
I re-worded the question to be less opinion based. –  Kevin Jan 9 at 17:51
4  
actually this is already answered: stackoverflow.com/questions/20906804/… –  Kevin Jan 9 at 17:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.