Let's say I have a directive myDirective. That directive wants to have an array of tag names tags, like for example ['new', 'owner']. This array is generated on the fly like;
<my-directive ng-repeat="that in a" tags="getTags(that.id)"></my-directive>
angular.module('x').directive(...
scope: {
tags: '@'
}
};
Where getTags is a function that returns an array of tags.
Like this, tags will just become a string "getTags(that.id)". If I put it in an expression like;
<my-directive ng-repeat="that in a" tags="{{getTags(that.id)}}"></my-directive>
tags will still be a string. But it will look like "['new', 'owner']" - but still a string. How do I pass the array?