简体   繁体   中英

How to remove additional image from the end with ng-repeat-start and ng-repeat-end?

I am displaying data with ng repeat and seperating each data with 1 image.Now i have different sections(ie td) for data rendering and image displaying .

Now the problem is that my image is displaying at the last which i dont want.

Current Behaviour: 在此处输入图片说明

Code:

<table border="0" cellpadding="0" cellspacing="0" align="left">
           <tr>
              <td align="center" ng-repeat-start="item in data">
                           <div>{{ item.Name }}</div>
               </td>
                <td align="center" valign="middle" ng-repeat-end>
                          <img src="~/images/LineSeperator.png">
                 </td>
           </tr>
</table>

How to do this??

您可以使用$last

ng-if="!$last"

I think this might help

<style>
  table td:last-child {
    display:none;
  }
</style>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM