1 {* This takes an $afform and generates an AngularJS module.
3 @param string $afform.camel The full camel-case name of the AngularJS module being created
4 @param array $afform.meta The full metadata record of the form
5 @param string $afform.metaJson The full metadata record of the form
6 @param string $afform.layout The template content (HTML)
9 (function(angular, $, _) {
10 angular.module('{/literal}{$afform.camel}{literal}', CRM.angRequires('{/literal}{$afform.camel}{literal}'));
11 angular.module('{/literal}{$afform.camel}{literal}').directive('{/literal}{$afform.camel}{literal}', function(afformCoreDirective) {
12 return afformCoreDirective({/literal}{$afform.camel|json},{$afform.metaJson}{literal}, {
13 template: {/literal}{$afform.layout|json}{literal}
16 })(angular, CRM.$, CRM._);