title: Add separation on ng-repeat values angularjs
body: <pre><code>&lt;span ng-repeat="sport in profile.sports track by $index"&gt;
        {{ (profile.type == 2) ? ($index &gt;= 0) ? sports[sport.sport_id] + ", " : sports[sport.sport_id] : '' }}
  &lt;/span&gt;
  </code></pre>
  
  <p>I want each element to be separate by <code>,</code> if there is at least 1 item.</p>
  
  <p>Expected result in <code>sports[sport.sport_id]</code>:</p>
  
  <pre><code>cricket, football, hockey
  cricket, hockey
  cricket
  cricket, soccer
  </code></pre>
  
  <p>Currently I'm getting all these without commas, please suggest, thanks.</p>