javascript - ng-repeat don't show last piece of text -


i have list of answers separate comma, not want last comma show - how can using ng-repeat , !$last? html have far (which not showing entire last answer):

<h3 ng-repeat="answer in correctanswers" ng-show="!$last">     {{answer + "," + " " }} </h3> 

i recommend not using separate span , toggling visibility, use closer have attempted:

 <h3 ng-repeat="answer in correctanswers">     {{answer + ($last ? '' : ',')}} </h3> 

no directives processed, simple boolean logic w/ concatenation of string


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -