0
Personal I am making a Directive(component) that needs a dependency $compile
, I am doing the operations on the directive link and need the $compile
inside of it only that I am not managing to inject the dependency someone there has already gone through something similar and managed to solve?
(function () {
'use strict';
angular
.module('calendar', ['calendar.tmpl'])
.directive('calendar', calendar);
function calendar() {
var directive = {
restrict: 'E',
scope: {
getData: '&',
tipo: '@',
iconSize: '@',
modelo: '=',
eventosData: '='
},
templateUrl: function (element, attrs) {
if (attrs.tipo == 'calendar') {
return 'calendar.html';
} else if (attrs.tipo == 'datapicker') {
return 'datapicker.html';
}
},
link: linkFunc
};
return directive;
}
function linkFunc(scope){
***//quero injectar o $compile aqui***
}
}());