1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
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.
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);