I used the ion-affix directive on elements of a dynamic array (updated with ng-repeat) and the scroll listener (line 168: angular.element($ionicScroll.element).on('scroll', ....) is created each time my array is updated, resulting in strange behaviour because the scroll function is called twice after one update, three times after 2 updates etc...
I managed to resolve this problem by adding the folowing code to the directive
Thanks for this useful plugin!
I used the ion-affix directive on elements of a dynamic array (updated with ng-repeat) and the scroll listener (line 168: angular.element($ionicScroll.element).on('scroll', ....) is created each time my array is updated, resulting in strange behaviour because the scroll function is called twice after one update, three times after 2 updates etc...
I managed to resolve this problem by adding the folowing code to the directive
Could you add this snippet or a to the next release of the plugin? Or maybe you think there is a more elegant way to resolve this problem
Thanks again for your work