AngularLoader
class AngularLoader
The AngularLoader loads any JS/CSS/JSON resources required for setting up AngularJS.
The AngularLoader stops short of bootstrapping AngularJS. You may
need to <div ng-app="..."></div>
or angular.bootstrap(...)
.
Constants
DEFAULT_MODULE_WEIGHT |
The weight to assign to any Angular JS module files. |
Properties
protected CRM_Core_Resources | $res | The resource manager. | |
protected Manager | $angular | The Angular module manager. | |
protected string | $region | The region of the page into which JavaScript will be loaded. | |
protected string | $pageName | ||
protected array | $modules | ||
protected array|null | $crmApp |
Methods
AngularLoader constructor.
Register resources required by Angular.
Use Civi's generic "application" module.
Get a list of all Angular modules which should be activated on this page.
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
at line 72
__construct()
AngularLoader constructor.
at line 85
AngularLoader
load()
Register resources required by Angular.
at line 193
AngularLoader
useApp(array $settings = [])
Use Civi's generic "application" module.
This is suitable for use on a basic, standalone Angular page
like civicrm/a
. (If you need to integrate Angular with pre-existing,
non-Angular pages... then this probably won't help.)
The Angular bootstrap process requires an HTML directive like
<div ng-app="foo">
.
Calling useApp() will replace the page's main body with the
<div ng-app="crmApp">...</div>
and apply some configuration options
for the crmApp
module.
at line 213
array
findActiveModules()
Get a list of all Angular modules which should be activated on this page.