If I have a directive for a table cell called
<table>
<tr>
<td cellDirective>Some cell Value</td>
<td cellDirective>Another cell value</td>
...
<tr> ...
<table>
defined by
myapp = angular.module('myapp', []);
myapp.directive('cellDirective', function() {
return {
link: function(scope, element) {
console.log(element);
element.addClass("coloring-class");
}
};
});
with the style
<style>
.coloring-class {
color: blue;
}
</style>
What I get in the console is a reference to an object with a ton of different attributes, but I cannot find one with the value in each cell. So how can I access the value inside an element?