I am having a hard time to figure out why the same piece of html is not working as it is working on other page. I am trying to call the function on scroll when it reaches the bottom of page , but it does not working like that. I scroll a little and there goes the call to api function.
<div class="search_filter_wrape tss_accordion_wrapper" infinite-scroll='jobPosting.loadMoreData()'
infinite-scroll-disabled='jobPosting.paused()'>
<div ng-repeat="jobPanel in jobPosting.jobs">
<h1 style="color:red">Hi</h1>
</div>
</div>
controller.js
jobPosting.loadingData = false;
function loadMoreData() {
if(jobPosting.loadingData) return;
jobPosting.loadingData = true;
api{
// .......
jobPosting.loadingData = false
}
}
function paused() {
// set this bit before call and after response
return jobPosting.loadingData;
}
Now whats wrong with this ?