Angularjs's Ng-repeat-start

Source: Internet
Author: User

Students using Angularjs are not unfamiliar to ng-repeat, he is used for data circulation, generally used in arrays or objects. But today we used a ng-repeat-start.

Ng-repeat-start, used in conjunction with Ng-repeat-end, specifies the starting element of the loop, the cutoff element of the loop, which means specifying a loop block.

If you simply ng-repeat an array loop and use it in conjunction with a table, you can generally only achieve the following effect.

<TR ng-repeat= "item in arr" >  <td>{{item.name}}</td> <td>{{item.sex}}</td> <td >{{item.age}}</td></tr>

  

But using Ng-repeat-start,ng-repeat-end with the table, you can achieve the following effect

<TR ng-repeat-start= "item in arr" >  <td>{{item.name}}</td> <td>{{item.sex}}</td> <td>{{item.age}}</td></tr><tr ng-repeat-end> <td>   <table>    <thead >      <tr>                              <th class= "has-paddin-left-24 header-config-left-sty" > Company name </th>         <th > Company Code </th>         <th> Add date </th>         <th class= "header-config-right-sty" > Action </th>      </tr>    </thead>   </table> </td></tr>

Angularjs's Ng-repeat-start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.