title: How to bind a jQuery event to dynamic content with AngularJS
body: <p>Basically in my controller, I'm doing an <code>$http.get()</code> to load some html to set a "current view". My issue is that I can't figure out how to rebind the the jQuery event with this new dynamic content.</p>
  
  <p>Right now, I've resorted to somethign like this:</p>
  
  <pre><code>$http.get('/someurl', {}).success(function(data){
    $scope.detailedView = data;
    // Now here comes the rebinding
    setTimeout(function(){
      // Use jquery to bind the new content
    }, 1500);
  });
  </code></pre>
  
  <p>I've been looking for a solution, and anything related that I've found points to using a directive. I've looked into this, but I do not know how a directive would be used for something like this.</p>
  
  <p><strong>Note</strong> without the timeout, the bindings run before the dynamic content is actually in the DOM. I've also tried finding something that would be similar to hooking into something after the $apply would run but have not found anything similar.</p>