Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / apps / workbench / app / assets / javascripts / angular_shim.js
1 // Compile any new HTML content that was loaded via jQuery.ajax().
2 // Currently this only works for tabs, and only because they emit an
3 // arv:pane:loaded event after updating the DOM.
4
5 $(document).on('arv:pane:loaded', function(event, $updatedElement) {
6     if (angular && $updatedElement) {
7         angular.element($updatedElement).injector().invoke([
8             '$compile', function($compile) {
9                 var scope = angular.element($updatedElement).scope();
10                 $compile($updatedElement)(scope);
11             }]);
12     }
13 });