Closed richfergus closed 8 years ago
Sorry I'm think there is a bit of confusion, the chart-data
attribute is not a canvas attribute so prefixing with ng-attr-
is not going to make any difference. Similarly chart-data
is not an attribute and it expects an array of elements so it is not a good candidate for interpolation which per the link you mention "is used by Angular to provide data-binding to text nodes and attribute values.".
I believe this is expected behavior, but it would be nice to have the attribute evaluate expressions. This would be especially nice when charts are part of a ngRepeat directive.
controller:
html:
perhaps something like this:
ng-attr-chart-data="{{key}}"
using angular interpolation