How to disable infinite-scroll?

How can we disable infinite scrolling once available results are empty? With the example I set $canScroll to false when next returns an empty response.

<ion-content scroll="{{$canScroll}}">
	<ion-item ng-repeat="thing in things">

I ended up setting $ to undefined when an empty response is returned, and found this solution using ngIf, but without unsetting the onScroll handler I continued to see it being triggered after setting the ngIf variable to false: