AngularLoader: Support 'settingsFactory' callbacks in angular modules.
authorColeman Watts <coleman@civicrm.org>
Sat, 10 Oct 2020 20:58:17 +0000 (16:58 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 12 Oct 2020 01:58:16 +0000 (21:58 -0400)
commitaa882f9b80f49252136748faf036c1ebe6bca7e2
treebcb883f69b332ec0c9fefedae81f036a4a72b4ac
parent5a7e2aca6a9ea8116d99474a5f2925ba971c61db
AngularLoader: Support 'settingsFactory' callbacks in angular modules.

This allows Angular modules with complex/expensive data to provide it with a callback,
which will only be invoked if the module is actively loaded on the page.

Normally, module settings are calculated on every page request, even if they are not needed.
Civi/Angular/AngularLoader.php
Civi/Angular/Manager.php
tests/phpunit/Civi/Angular/LoaderTest.php [new file with mode: 0644]