I have a directive which has a function for template
restrict: 'E', // 'A' is the default, so you could remove this line
scope: {
field : '@field',
},
template: function( element, attrs) {
//some code here
},
link: function (scope, element, attrs) {
Is it possible to access the directive's scope from the template function? I'm trying to do something like
if (scope.columnType == 'test'){ .. }
because I want to render a different template based on other values