title: angular.element vs document.getElementById or jQuery selector with spin (busy) control
body: <p>I'm using the "Angularised" version of the Spin control, as documented here: <a href="http://blog.xvitcoder.com/adding-a-weel-progress-indicator-to-your-angularjs-application/" rel="noreferrer">http://blog.xvitcoder.com/adding-a-weel-progress-indicator-to-your-angularjs-application/</a> </p>
  
  <p>One of the things I don't like about the shown solution is the use of jQuery in the service that effectively attaches the spin control to the DOM element. I would prefer to use angular constructs to access the element.  I'd also like to avoid "hard-coding" the id of the element that the spinner needs to attach to within the service and instead use a directive that sets the id in the service (singleton) so that other users of the service or the service itself don't need to know that.</p>
  
  <p>I'm struggling with what angular.element gives us vs what document.getElementById on the same element id gives us.
  eg. This works:</p>
  
  <pre><code>  var target = document.getElementById('appBusyIndicator');
  </code></pre>
  
  <p>None of these do:</p>
  
  <pre><code>  var target = angular.element('#appBusyIndicator');
    var target = angular.element('appBusyIndicator');
  </code></pre>
  
  <p>I'm clearly doing something that should be fairly obvious wrong!  Can any one help?</p>
  
  <p>Assuming I can get the above working, I have a similar problem with trying to replace jQuery access to the element:
  eg <code>$(target).fadeIn('fast');</code>  works
     <code>angular.element('#appBusyIndicator').fadeIn('fast')</code> or <code>angular.element('appBusyIndicator').fadeIn('fast')</code> doesn't</p>
  
  <p>Can someone point me to a good example of documentation that clarifies use of an Angular "element" vs the DOM element? Angular obviously "wraps" the element with its own properties, methods etc but it's often hard to get the original value. For example if I have an <code>&lt;input type='number'&gt;</code> field and I want to access the original contents that are visible in the ui when the user types "--" (without the quotes) I get nothing, presumably because the "type=number" means Angular is rejecting the input even though it's visible in the UI and I want to see it so I can test for it and clear it down.</p>
  
  <p>Any pointers/answers appreciated.</p>
  
  <p>Thanks.</p>