From d67ff852ab363f0aa3cdcbd4c1d4fc9c40d346ae Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 17 Nov 2020 20:39:05 -0500 Subject: [PATCH] Allow Angular modules to require Resource bundles --- Civi/Angular/AngularLoader.php | 4 ++++ Civi/Angular/Manager.php | 1 + 2 files changed, 5 insertions(+) diff --git a/Civi/Angular/AngularLoader.php b/Civi/Angular/AngularLoader.php index 11ef57276c..4d92fa81f3 100644 --- a/Civi/Angular/AngularLoader.php +++ b/Civi/Angular/AngularLoader.php @@ -175,6 +175,10 @@ class AngularLoader { $res->addStyleUrl($url, self::DEFAULT_MODULE_WEIGHT + (++$headOffset), $this->getRegion()); } } + // Add bundles + foreach ($this->angular->getResources($moduleNames, 'bundles', 'bundles') as $bundles) { + $res->addBundle($bundles); + } return $this; } diff --git a/Civi/Angular/Manager.php b/Civi/Angular/Manager.php index 5724bdab68..7d7c9f71f7 100644 --- a/Civi/Angular/Manager.php +++ b/Civi/Angular/Manager.php @@ -417,6 +417,7 @@ class Manager { case 'settingsFactory': case 'requires': case 'permissions': + case 'bundles': if (!empty($module[$resType])) { $result[$moduleName] = $module[$resType]; } -- 2.25.1