Just starting out with angular and I have a table that displays angular data directly in the HTML without any controller or model.
<table width="98%" border="0" cellspacing="1" cellpadding="2" class="labels" align="center" id="locc">
<tr style="color:#000;font-size:15px;font-family:Arial, Helvetica, sans-serif;background-repeat:repeat-x" height="30" >
<td colspan="4" align="center"></td>
</tr>
<tr style="color:#000;font-size:15px;font-family:Arial, Helvetica, sans-serif;background-color:gold;background-repeat:repeat-x"
height="30" >
<td width="211" align="center">COMMODITY</td>
<td width="149" align="center" valign="middle" >BUY</td>
<td width="175" align="center" valign="middle" >SELL</td>
</tr>
<tbody ng-repeat="item in newsData | limitTo : 2" >
<tr bgcolor="#FFFFFF" height="40" >
<td align="center" style="background-image:url(images/td.png);color:#000;font-size:15px" >{{item.COMMODITY | limitTo: 18 }}</td>
<td align="center" valign="middle" style="color:#000000;font-size:20px" class="{{item.BCOL}}" ><div > {{item.BUY}} </div></td>
<td align="center" valign="middle" style="color:#000000;font-size:20px" class="{{item.SCOL}}" ><div >{{item.SELL}} </div></td>
</tr>
</tbody>
</table>
This code snippet generates the following output:
https://i.stack.imgur.com/FHf1Y.png
All the data under "Commodity" is displayed by default. My goal is to only show content like 999[GOLD][IMPORTED] and truncate the rest of the text after that.