andrzej andrzej - 1 year ago 124
AngularJS Question

ngTagsInput get and parse data from database

When I use ngTagsInput before send to database I do:


When I make get I receive something like this in my scope {{}}:


What can I do to show my tags like this:

abc, cba, tag

Answer Source

In the template:

<span ng-repeat="(key, value) in tags"><span ng-if="!$first">, </span><span>{{value.text}}</span></span>

Or with Underscore in code:

var str = _.pluck(list, 'text').join(', ')

Other options here: Show an aggregated list in angularjs

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download