# Pull down to Refresh and Infinite Scroll

**URL:** <https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625>\
**Category:** ionic-v1\
**Created:** [October 1, 2015, 8:30am UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625 "2015-10-01T08:30:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kernel](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kernel](https://forum.ionicframework.com/u/kernel)\
**Post date:** [October 1, 2015, 8:30am UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625/1 "2015-10-01T08:30:53Z")

</div>

I am using ionic 1.1.0

I have pull down to refresh and infinite scroll implemented following the examples.

They work individually.

The issue I have is, when I pull down to refresh, infinite scroll doesn’t run anymore when it reaches the bottom of the list.

Any idea why this is happening?

Any help is appreciated. Thank a lot in advanced.

---

<div class="post-metadata">

**Author:** ![Jastkast](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jastkast/32/69592_2.png) [@Jastkast](https://forum.ionicframework.com/u/Jastkast)\
**Post date:** [October 1, 2015, 10:27am UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625/2 "2015-10-01T10:27:25Z")

</div>

Add some code sample, so anyone can help you out.

---

<div class="post-metadata">

**Author:** ![kernel](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kernel](https://forum.ionicframework.com/u/kernel)\
**Post date:** [October 1, 2015, 3:14pm UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625/3 "2015-10-01T15:14:48Z")

</div>

Here’s the view:

```
<ion-refresher
  pulling-text="拉下更新"
  on-refresh="doRefresh()">
</ion-refresher>

 <ion-infinite-scroll
    on-infinite="loadMore()"
    distance="1%">
  </ion-infinite-scroll>

```

Here’s the controller:

```
 $scope.doRefresh = function() {
    $scope.page = 1;
    var promise = JobsServices.getJobs($scope.page);
    promise.then(function(resolve){
      $scope.jobs = resolve.jobs;
    });
    $scope.$broadcast('scroll.refreshComplete');
  };

  $scope.loadMore = function() {
    $scope.page ++;
    JobsServices.getJobs($scope.page).then(function(resolve) {
      $scope.jobs = $scope.jobs.concat(resolve.jobs);
      $scope.$broadcast('scroll.infiniteScrollComplete');
    });
  };

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Jastkast](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jastkast/32/69592_2.png) [@Jastkast](https://forum.ionicframework.com/u/Jastkast)\
**Post date:** [October 1, 2015, 5:54pm UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625/4 "2015-10-01T17:54:04Z")

</div>

Maybe your request returning some errors:

```
    JobsServices.getJobs($scope.page).then(function(resolve) {
          $scope.jobs = $scope.jobs.concat(resolve.jobs);
          $scope.$broadcast('scroll.infiniteScrollComplete');
        }, function() {
              console.log('Request error');
              $scope.$broadcast('scroll.infiniteScrollComplete');
});
```

---

<div class="post-metadata">

**Author:** ![kernel](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kernel](https://forum.ionicframework.com/u/kernel)\
**Post date:** [October 2, 2015, 2:12am UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625/5 "2015-10-02T02:12:54Z")

</div>

I tried what you said, there’s no error. Basically loadMore() is not even getting called at all at the bottom of the list after I pull down to refresh. I put a console at the beginning of loadMore() and it run. Any ideas?

---

<div class="post-metadata">

**Author:** ![Jastkast](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jastkast/32/69592_2.png) [@Jastkast](https://forum.ionicframework.com/u/Jastkast)\
**Post date:** [October 2, 2015, 6:35am UTC](https://forum.ionicframework.com/t/pull-down-to-refresh-and-infinite-scroll/33625/6 "2015-10-02T06:35:42Z")

</div>

Ok, so when you put console.log() in loadMore() you get nothing after you pull down to refresh. And there is also no errors in doRefresh() request ?

```
$scope.loadMore = function() {
    console.log('Reached here');
    $scope.page ++;
    JobsServices.getJobs($scope.page).then(function(resolve) {
      $scope.jobs = $scope.jobs.concat(resolve.jobs);
      $scope.$broadcast('scroll.infiniteScrollComplete');
    });
  };

```

Show your template, please.
