Unable to call the Ion infinite scroll method present in the angular controller using the iic fancy select directive

I use the Ionic multi select directive, I want to do pagination. So, I used the ion-infantile scroll. I added an ion-infinte-scroll to the fantastic directive. But, when I scroll down the method present in the controller does not receive the call.

Added code below in fancy select directive. In fancy select directive.js (lines # 115 and 116)

<ion-infinite-scroll immediate-check="false"
  on-infinite="scrollDown()" distance="5%"></ion-infinite-scroll>

In script.js

$scope.scrollDown = function(){
   console.log('function triggered'); 
} 

I created a plunker for this https://plnkr.co/edit/ZlhZOZVcDGuIxRyEtCfv?p=preview . Please help me.

+4
source share
1 answer

, , :

 modalScope.scrollMethod = scrollMethod;

scrollMethod:

scrollMethod = attrs.scrollMethod,

, HTML scroll-method: camelCase JS, HTML.

scrollMethod() , ( ). - $rootScope.

:

https://plnkr.co/edit/3CK1wUEQustmkEPoJBqG?p=preview

+2

Source: https://habr.com/ru/post/1629013/


All Articles