Skip to content

Make ionRefresher promise-friendly - #4222

Merged
mlynch merged 1 commit into
ionic-team:masterfrom
beauby:refresher-promise
Dec 6, 2015
Merged

mlynch merged 1 commit into
ionic-team:masterfrom
beauby:refresher-promise

Conversation

@beauby

@beauby beauby commented Aug 12, 2015

Copy link
Copy Markdown

Make ionRefresher play ball when onRefresh function returns a promise.

@mhartington

Copy link
Copy Markdown
Contributor

Do you have an example for how this change PTR? Also, could you provide a test for this?

@beauby

beauby commented Aug 12, 2015

Copy link
Copy Markdown
Author

Here is an example:

var myRefreshFunction = function() {
  return fetchNewData();
};

instead of

var myRefreshFunction = function() {
  fetchNewData().finally(function() {
    $scope.$broadcast('scroll.refreshComplete');
  });
};

Note that this commit PR is backwards compatible.

@markspolakovs

Copy link
Copy Markdown

👍

@ryanlin1986

Copy link
Copy Markdown

This is really good.

@mhartington

Copy link
Copy Markdown
Contributor

I'll let @perrygovier take a look at this.

@beauby

beauby commented Oct 7, 2015

Copy link
Copy Markdown
Author

Any feedback on this one?

@perrygovier perrygovier added this to the 1.2 milestone Oct 8, 2015
mlynch added a commit that referenced this pull request Dec 6, 2015
Make ionRefresher promise-friendly
@mlynch
mlynch merged commit d1f31a4 into ionic-team:master Dec 6, 2015
@mlynch

mlynch commented Dec 6, 2015

Copy link
Copy Markdown
Contributor

👍 🍕 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants