Merge branch 'master' into 4523-search-index
[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(function($compile) {
8             var scope = angular.element($updatedElement).scope();
9             $compile($updatedElement)(scope);
10         });
11     }
12 });