I've been struggling with an issue for quite some time. Can anyone offer assistance? I'm trying to implement the table directive in various areas, so I created a directive that integrates Angular UI grid into it. However, I keep encountering a compile error.
Error: angular.min.js:102 ReferenceError: compile is not defined
Despite this, I am able to load the grid content successfully.
Where did I go wrong here?
HTML
<div ng-controller="ctrl1 as two">
<ltcg-table><ltcg-table>
</div>
<div ng-controller="ctrl2 as two">
<ltcg-table><ltcg-table>
</div>
JS
myApp.directive('ltcgTable', function($compile) {
return {
restrict: 'E',
transclude: true,
replace: false,
scope: { },
controller: Controller,
controllerAs: 'Controller',
bindToController: true,
compile: compile
}
});