I'm using angularjs infinite scroll in my dashboard web app. I have a single page which holds multiple infinite scrollable widgets. Since I want to have an infinite scroll for each of them I decided to use this directive but somehow it's not working as expected. I want the infinite scroll to work relative to the inner content div scrollbar which uses perfect scrollbar instead of main browser window. I have searched on google and found multiple threads explaining 2 new variables which can be used to change the default behavior: infinite-scroll-container and infinite-scroll-parent. I tried both but none of them is working for me. I think use of perfect-scrollbar is creating the issue.
Jade code:
.hor-col(ng-repeat="stream in socialStreams")
.box-body(style='min-height: 400px;')
perfect-scrollbar.timeline-scroller(wheel-propagation="true" wheel-speed="1" min-scrollbar-length="8" suppressScrollX="true" id="streamScroll-{{$index}}")
div(infinite-scroll="loadMorePosts(stream['streamId'], stream['endCursor'])", infinite-scroll-disabled="stream['infiniteScrollDisabled']", infinite-scroll-container="'#streamScroll-{{$index}}'")
Since there are multiple widgets, I can't use same id or class for infinite-scroll-container and therefore decided to generate dynamic id.
How can I inject a dynamic class inside infinite-scroll-container ?
I'm getting following error:
Error: Failed to execute 'querySelector' on 'Document': '#streamScroll-{{$index}}' is not a valid selector.
P.S. I have seen following threads but none of them covered my requirement:
https://github.com/sroze/ngInfiniteScroll/issues/57