title: Where to wrap third party plugins in AngularJS?
body: <p>I am new to Angular and I understand one of its 'rules' is that no DOM manipulation should exist in the controller. I have heard that a lot of people starting out with Angular dont completely understand this and end up writing JS code directly into their application,  my understanding of this is if you are writing an Angular application you should completely forget about regular JavaScript.</p>
  
  <p>I have found that in order to use a third party plugin or a regular JS script in an Angular app is to wrap it up in an object. I have read that usually this is done by either wrapping the script inside a directive or a service.</p>
  
  <p>So I have a couple of questions:</p>
  
  <ol>
  <li><p>What are the main concerns to think about when choosing between a directive or a service as a wrapper? </p></li>
  <li><p>Are there major performance and/or maintenance issues between using a directive or service as a wrapper?</p></li>
  </ol>
  
  <p>I suspect that if you are doing any http requests that you would in that circumstance use a service, that is the only thing that I know when you would use a service as a wrapper object</p>