8784: Fix test for latest firefox.
[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 && angular.element($updatedElement).injector()) {
7         angular.element($updatedElement).injector().invoke([
8             '$compile', function($compile) {
9                 var scope = angular.element($updatedElement).scope();
10                 $compile($updatedElement)(scope);
11             }]);
12     }
13 });