1 (function(angular
, $, _
) {
2 // Declare a list of dependencies.
3 angular
.module('afCore', CRM
.angRequires('afCore'));
5 // Use `afCoreDirective(string name)` to generate an AngularJS directive.
6 angular
.module('afCore').service('afCoreDirective', function($routeParams
, crmApi4
, crmStatus
, crmUiAlert
) {
7 return function(camelName
, meta
, d
) {
10 d
.scope
.options
= '=' + camelName
;
12 pre: function($scope
, $el
, $attr
) {
13 $scope
.ts
= CRM
.ts(camelName
);
14 $scope
.routeParams
= $routeParams
;
16 $scope
.crmApi4
= crmApi4
;
17 $scope
.crmStatus
= crmStatus
;
18 $scope
.crmUiAlert
= crmUiAlert
;
19 $scope
.crmUrl
= CRM
.url
;
25 })(angular
, CRM
.$, CRM
._
);