title: how to set focus to anchor tag which is inside a div element and the div element is having ng-show
body: <pre><code>&lt;div   class="test" ng-show="model.data.IsDataLoaded" tabindex="50"&gt;
    &lt;a href="" id="id1" ng-click="testData($event)"&gt;Clear all&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>//in the js i am trying to set the focus by below code</p>
  
  <pre><code>$scope.model.data.IsDataLoaded = true;
   angular.element("#id1").focus();
  </code></pre>