I have the following statement:
<div id="someid" when-scrolled=hasMoreItemsToShow(filteredproducts.length, limit)>
hasMoreItemsToShow() checks if there are more items remaining in the list to be shown. If it returns true, then the following method is executed:
when-scrolled is a custom directive defined by me which checks if the scroll-bar has reached the end of the page.
So, what I want to do achieve this? That is, on end of scroll event, first check if hasMoreItemsToShow() returns true, and if yes, then call showMoreItems()
I am very new to Angular, so please excuse me if the question appears naive.
<div id="someid" when-scrolled=hasMoreItemsToShow(filteredproducts.length, limit) && showMoreItems() >
ShowMoreItems will only be called if the first part is true