projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fc6fba
)
CRM-14725 - Add Angular service wrapper for CRM.api3
author
Tim Otten
<totten@civicrm.org>
Thu, 22 May 2014 01:44:11 +0000
(18:44 -0700)
committer
Tim Otten
<totten@civicrm.org>
Thu, 22 May 2014 01:44:11 +0000
(18:44 -0700)
templates/CRM/Core/Page/Angular.tpl
patch
|
blob
|
blame
|
history
diff --git
a/templates/CRM/Core/Page/Angular.tpl
b/templates/CRM/Core/Page/Angular.tpl
index ca531b944d7929c833b5c966f24a04b819b4c85b..1ff32b35d9e520b73fe2baf7d739d92c34227e02 100644
(file)
--- a/
templates/CRM/Core/Page/Angular.tpl
+++ b/
templates/CRM/Core/Page/Angular.tpl
@@
-13,6
+13,12
@@
});
}
]);
+ crmApp.factory('crmApi', function(){
+ return function(entity, action, params, message) {
+ // JSON serialization in CRM.api3 is not aware of Angular metadata like $$hash
+ return CRM.api3(entity, action, eval('('+angular.toJson(params)+')'), message);
+ };
+ });
})();
</script>