title: Get the Id of the element in Angular js
body: <p>I have assigned the id value of an element in angularjs to a variable like below </p>
  
  <pre><code>var test = angular.element("#sqldiv");
  </code></pre>
  
  <p>I'm sending the test variable to a function and wanted to use the id of the element in the function. I'm unable to retrieve the id value.  when I try to put an alert for test. it just give [object,Object] as the output.Please let me know how to retrieve the id value of the element. i.e I wanted the value as <code>"#sqldiv"</code>.</p>
  
  <p>Any help on this is much appreciated. Thanks in Advance. </p>