0

I'm building an angularJS app. I've many data to retrieve from an array of json objects, and I've to limit the number of those data, and I want to use limitTo to perform that.

I use ng-repeat inside a directive like below :

<my-directive
    ng-repeat="unConteneur in conteneurs | limitTo: 10"
    ng-show="(unConteneur.libelle_rubrique==rubriqueCourante || unConteneur.nom==rubriqueCourante) && hideSearch"
    contenu="unConteneur">
</my-directive>

But putting limitTo, removes all my items from the DOM. My code work properly when I remove limitTo. And I don't know why!

I imported angular and all other libraries correctly.

Where I'm wrong?

Shi
  • 4,178
  • 1
  • 26
  • 31
kabrice
  • 1,475
  • 6
  • 27
  • 51

0 Answers0