Imagine I have a basic directive defined like this:
app.directive('someDirective', [function() {
return {
restrict: 'E',
link: function() {
},
controller: [function() {
// Want to access directive object here...
}]
}
}]);
Is it possible to access the someDirective
object generated inside the someDirective
's controller function? I understand that the this
property refers to the directive object within the compile
and template
functions, but I am unsure how to access the directive object in the controller function. Any helpful techniques?
Appreciate any advice.