0

If I comment out...

infinite-scroll="content.loadContent()

... then my items bind correctly. If I leave it in then, even though loadContent is called when I scroll, no items are bound.

div(ng-controller='contentController as content', class="wrapper", ng-cloak)
    ul#contentList(infinite-scroll="content.loadContent()", infinite-scroll-distance="20")
        li.item(ng-repeat='item in content.content')
            OMG

If I bind to a simple inline array then that binds ok even with infinite scroll in place.

Why is infinite scroll stopping my controller content from binding? Is it because it has an isolate scope? If so then how does the demo code here manage to access the scope of the outer controller?

Ian Warburton
  • 13,336
  • 19
  • 85
  • 164

0 Answers0