refactor(ionicContent): use $-prefix for onRefresh and onScroll events

Closes #675
This commit is contained in:
Andy Joslin
2014-02-25 11:18:25 -05:00
parent 0f1b6f47b8
commit b406305b19
5 changed files with 16 additions and 15 deletions

View File

@@ -43,12 +43,13 @@ angular.module('ionic.ui.scroll')
var refresherHeight = self.refresher.clientHeight || 0;
scrollView.activatePullToRefresh(refresherHeight, function() {
self.refresher.classList.add('active');
$scope.$onRefreshOpening && $scope.$onRefreshOpening();
}, function() {
self.refresher.classList.remove('refreshing');
self.refresher.classList.remove('active');
}, function() {
self.refresher.classList.add('refreshing');
$scope.onRefresh && $scope.onRefresh();
$scope.$onRefresh && $scope.$onRefresh();
$scope.$parent.$broadcast('scroll.onRefresh');
});
}