search

Home  >  Q&A  >  body text

angular.js - ng-repeat循环第一条和其他的显示不一样

就是一个列表循环,第一条需要置顶显示,然后其他的在下面。我现在一个指令用了一个模板循环,实现不了啊,求救

巴扎黑巴扎黑2743 days ago546

reply all(3)I'll reply

  • 黄舟

    黄舟2017-05-15 16:57:05

    http://stackoverflow.com/questions/19635636/first-in-ngrepeat

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-15 16:57:05

    The following attributes are available in ng-repeat:

    • $index

    • $first

    • $middle

    • $last

    • $even

    • $odd

    In addition, there are the following commands:

    • ng-repeat-start

    • ng-repeat-end
      Reference: http://stackoverflow.com/questions/23627658/problems-with-ng-repeat-start

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-15 16:57:05

    用ng-class

    reply
    0
  • Cancelreply