search

Home  >  Q&A  >  body text

angular.js - $index value after ng-repeat filtering does not match?

After ng-repeat is filtered by a certain condition, how can we get the data length after being filtered by this condition? ? ?

过去多啦不再A梦过去多啦不再A梦2793 days ago578

reply all(2)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-05-15 17:00:42

    Rough method: {{(list | filter : f).length}},最好不要这样用,最好在controllerfilterYeah

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-15 17:00:42

    http://stackoverflow.com/questions/21379426/angular-get-length-of-filtered-ng-repeat

    reply
    0
  • Cancelreply