I have a following array:
"cast": [
{
"name": "James Stewart"
},
{
"name": "Kim Novak"
},
{
"name": "Barbara Bel Geddes"
},
{
"name": "Tom Helmore"
}
]
What is the neat in AngularJS to to format it as:
James Stewart, Kim Novak, Barbara Bel Geddes, Tom Helmore
Is there a way to use filter
or formatter
so that I can neatly do it in template like:
<font class="authors-string">{{ object.cast | filter/formatter/? }}</font>
I think writing logic for this simple parsing in controller would clutter controller body.
Thanks for your interest.
ng-repeat
:<div ng-repeat="person in cast">{{ person.name }}</div>
edit:<span>
might be better for you here – Rifeng-repeat
not work? – Webby