There are a few things you need to change for a directive to see an array of labels.
Modify the HTML with good tags first:
<pretty-tag labels-array='labels'></pretty-tag>
Note that labelArray was changed to label-array (directive and attribute names must follow this dashed convention), and {{labels}} was simply changed to labels (so that bidirectional binding could be set in the array).
Next, inside your directive, scopeArray scope must be '=' so that the local scope property can refer to the property of the parent scope:
scope: {labelsArray: '='},
Violin: http://jsfiddle.net/Hmcj8/
source share