javascript - ngInfiniteScroll Triggers On All Scroll Events -
i using nginfinitescroll enable infinite scrolling on website. in order work have had set height of outer div value shown below. if don't infinite scroll feature triggered
<div style="height: 1px"> <post post-item="item" feed-items="items.feed" feed-name="feedname" ng-repeat="item in items.feed"></post> <a style="bottom-padding 7%" infinite-scroll="nextposts()" infinite-scroll-distance="1" href ng-click="nextposts()" class="show-more">no more posts show </a> </div>
however, setting height:1px kind of screws css styling , sense technically cheating, since have bottom-padding on
does know way can infinite scroll not triggered on scrolling events without using style="height: 1px
i have looked @ post has not helped. how maintain parents of floated elements collapsing?
thanks!
http://binarymuse.github.io/nginfinitescroll/documentation.html
typically, utilize infinitescroll
directive on element contains element uses ngrepeat
show series of elements based on array (or object); look pass in infinite-scroll
attribute add together additional elements array, expanding ngrepeat
.
maybe seek base of operations example:
<div infinite-scroll="nextposts()"> <post post-item="item" feed-items="items.feed" feed-name="feedname" ng-repeat="item in items.feed"></post> </div>
javascript css angularjs nginfinitescroll
No comments:
Post a Comment