In one of our angular application, we are using ui-scroll directive for lazy-loading. I have created a adapter and assigned to the ui-scroll directive. I need to reload the entire data by making API request and refresh data.
From ui-scroll docs, we can see reload() method available for adapter which we are assigning to directive.
$scope.listAdapter = {adapter:{remain:true}};
We are passing this adapter to custom datasource and which in turn is assigned to the ui-scroll repeater.
When user clicks on a button, i need to reload the entire result by pulling latest results from API. So i tried by adding,
$scope.listAdapter.reload();
When i tried call reload method, it throws exception stating method not found. TypeError: $scope.listAdapter.reload is not a function
Also i tried by re-assigning datasource and passing empty adapter to the scope variable, but no luck.
If anyone has fixed this, please let me know what need to be done.