I am working with a directive that looks like this:
.directive('grapharea', function () {
return {
restrict:'C',
compile: function (element, attr) {
debugger;
//the issue is that attr.passed is being set to graph_${{row.id}} instead of graph_1 or graph_2 ...
return function postLink(scope, element, attrs) {
};
}
};
})
Below is the ng-repeat code I'm using:
<div ng-repeat="row in rows">
<div id="graph_{{$index}}" data-passed="{{row.passed}}" data-failed="{{row.failed}}" class="grapharea"></div>
</div>
Question: Why is the $index value not appearing in my directive?