javascript - AngularJS ng-infinite-scroll not working on a specific container/div -


i wrote code after reading multiple posts ng-infinite-scroll

<div class="course-enrollment-friends" ng-class="{'friends-paginated':showmorefriends}">     <div class="row" id="enrollment-friends" ng-show="!nofriends">         <div          infinite-scroll="enrollctrl.retyearandsem()"          infinite-scroll-disabled='!{{showmorefriends}}'          infinite-scroll-parent='true'>             <div class="col-md-2" ng-repeat="friend in friends" style="margin-bottom:10px;"> 

however didn't work. tried different

<div class="course-enrollment-friends" ng-class="{'friends-paginated':showmorefriends}">     <div class="row" id="enrollment-friends" ng-show="!nofriends">         <div          infinite-scroll="enrollctrl.retyearandsem()"          infinite-scroll-disabled='!{{showmorefriends}}'          infinite-scroll-container='.course-enrollment-friends'>             <div class="col-md-2" ng-repeat="friend in friends" style="margin-bottom:10px;"> 

what doing wrong?

from answer in this thread, seems forgot double quotes:

the value of infinite-scroll-container in example is double-quoted class name .content wrapped single quotes. if read source, string value gets fed document.queryselector. can read documentation on see value expects.

without double quotes .course-enrollment-friends passed in variable name, not string required.

so

infinite-scroll-container='".course-enrollment-friends"' 

instead of

infinite-scroll-container='.course-enrollment-friends' 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -