title: alternative of 'getElementById' in angularjs
body: <p>Check this <a href="http://plnkr.co/edit/Odm16CqfgIeAivF2Z94x?p=preview" rel="noreferrer">PLNKR</a>, i have one list with id <code>myMenuList</code>, this id am accessing in <code>script.js</code> to display <code>Numer of li</code> and <code>UL width</code> by <code>$scope.mml = angular.element(document.getElementById('myMenuList'));</code>.
  But as per requirement I should not be accessing it in controller like this. Is there any alternative we can do by keeping the same behaviour? </p>
  
  <p><strong>HTML CODE</strong></p>
  
  <pre><code>  &lt;div class="menucontainer left"&gt;
     &lt;ul id="myMenuList" ng-style="myStyle"&gt;
       &lt;li ng-repeat="item in items"&gt; &lt;a href="#"&gt;{{item.name}}&lt;/a&gt;        &lt;/li&gt;
     &lt;/ul&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code> $scope.mml = angular.element(document.getElementById('myMenuList'));
   $timeout(function() {
     $scope.numerofli = $scope.mml.find('li').length;
      $scope.ulwidth = $scope.mml[0].clientWidth;
   }, 1000);
  </code></pre>