angularjs与vue循环数组对象是区别

一直都觉得angularjs和vue是想类似的,今天在限制加载的数据条数时发现 其不同,话不多说,直接看代码:

1.angularjs

<li ng-repeat="item in dataList | limitTo:6">
  <p>{{item.name}}</p>
  <span class="overflow multiLine">{{item.description}}</span>
</li>

2.vue

<li v-for="(item,index) in dataList " v-if="index<6">
  <p>{{item.name}}</p>
  <span class="overflow multiLine">{{item.description}}</span>
</li>

原文地址:https://www.cnblogs.com/wuweb/p/9244847.html