Using ng-if inside ng-bind Angular Js
2 answers
Use the ternary operator inside the mustache as follows:
<span ng-repeat="tag in tags">
{{tag + $last ? "" : "," }}
</span>
Hooray!
EDIT: I wrote the answer in a hurry before fixing the error above:
<span ng-repeat="tag in tags">
{{tag}}{{$last ? "" : ","}}
</span>
or
<span ng-repeat="tag in tags">
{{tag + ($last ? "" : ",")}}
</span>
+2