1

I have a list of elements (tags) that I want to show comma separated but last one. But it´s not working. Commas are not displayed.

<span ng-repeat="tag in post.tags"><a href="">{{tag.name | translate}}</a><span ng-show="{{!$last}}">, </span></span>

3 Answers 3

1

Try ng-hide="$last" instead. You don't need {{ and }} in this context.

Sign up to request clarification or add additional context in comments.

Comments

1

I tried to do the similar example and looks like the problem is with a filter 'translate'

{{tag.name | translate}}

http://jsfiddle.net/kikill/re4x99ra/

Comments

0

All right,

I finally solved it with: {{{true: '', false: ', '}[$last]}}

1 Comment

actually {{ }} should be removed. Then, it should be ok. Besides, I suggest you to use a nice IDE like sublime to detect such typo mistakes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.