Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / assets / javascripts / angular_shim.js
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 // Compile any new HTML content that was loaded via jQuery.ajax().
6 // Currently this only works for tabs, and only because they emit an
7 // arv:pane:loaded event after updating the DOM.
8
9 $(document).on('arv:pane:loaded', function(event, $updatedElement) {
10     if (angular && $updatedElement && angular.element($updatedElement).injector()) {
11         angular.element($updatedElement).injector().invoke([
12             '$compile', function($compile) {
13                 var scope = angular.element($updatedElement).scope();
14                 $compile($updatedElement)(scope);
15             }]);
16     }
17 });