Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ionRefresher promise-friendly #4222

Merged
merged 1 commit into from
Dec 6, 2015
Merged

Make ionRefresher promise-friendly #4222

merged 1 commit into from
Dec 6, 2015

Conversation

beauby
Copy link

@beauby beauby commented Aug 12, 2015

Make ionRefresher play ball when onRefresh function returns a promise.

@mhartington
Copy link
Contributor

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

@beauby
Copy link
Author

beauby commented Aug 12, 2015

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

👍

@ryanlin1986
Copy link

This is really good.

@mhartington
Copy link
Contributor

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

@beauby
Copy link
Author

beauby commented Oct 7, 2015

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
Copy link
Contributor

mlynch commented Dec 6, 2015

👍 🍕 🍻

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