2

This is not a question about how to do a specific kind of DOM manipulation in AngularJS. This is a question about the place of DOM manipulations in Angular.

Essentially I want to ask:

When should we manipulate the DOM (Well known use cases)?

Where should we manipulate the DOM (Controllers, Directives, call backs, etc)?

Should we try to avoid DOM manipulations as much as possible?

I want to craft quality code. I want to make sure I follow the best practices when integrating a DOM manipulation library like jQuery and AngularJS.

Alexander Ventura
  • 1,150
  • 1
  • 10
  • 32
  • This question contains all the information I wanted: http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background?rq=1 – Alexander Ventura Jul 19 '13 at 03:27
  • 1
    Looks like good coverage of the topics. Generally speaking the rule is DOM manipulations are to be done with directives only, and in some rare edge cases there's a need to access the DOM from services but this should be limited as much as possible since it increases the complexity of testing the services. – shaunhusain Jul 19 '13 at 03:34

0 Answers0