title: Execute Javascript after Angular DOM Manipulation
body: <p>I got pagination in angular done in <code>$http.get</code> like that:
  <br></p>
  
  <pre><code>if (vm.currentPage &lt;= 6) {
        vm.pagination = _.range(1, 11);
  }
  if (vm.currentPage &gt; 6) {
      vm.pagination = _.range(vm.currentPage - 5, vm.currentPage + 5);
  }
  if (vm.currentPage &gt; vm.maxPage - 5) {
        vm.pagination = _.range(vm.maxPage - 10, vm.maxPage + 1)
  }
  </code></pre>
  
  <p><br></p>
  
  <pre><code>&lt;li ng-repeat='val in vm.pagination' class="page"&gt;
     &lt;a href="{{val}}" value="{{val}}"&gt;{{val}}&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I also got jquery function that i want to be execute after vm.pagination is updated on index.html:</p>
  
  <pre><code>$("a[value=" + vm.currentPage + "]").parent().addClass("active");
  </code></pre>
  
  <p>At this point i'm waiting to $http.get is finished, and execut jquery function after it, but still Angular add new li elements after everything is executed in controller.</p>
  
  <p>How to make jquery function executed after Angular finish updated vm.pagination in view?</p>