Starting to move over to content directive

This commit is contained in:
Max Lynch
2013-11-27 15:15:28 -06:00
parent 4e42d7c996
commit 0d8ba0f067
5 changed files with 33 additions and 45 deletions

View File

@@ -55,7 +55,7 @@ angular.module('ionic.ui.content', [])
if(attr.refreshComplete) {
$scope.refreshComplete = function() {
if($scope.scrollView) {
$scope.scrollView.doneRefreshing();
//$scope.scrollView.doneRefreshing();
$scope.$parent.$broadcast('scroll.onRefreshComplete');
}
};
@@ -78,17 +78,8 @@ angular.module('ionic.ui.content', [])
}
$element.append(sc);
// Otherwise, supercharge this baby!
sv = new ionic.views.Scroll({
el: $element[0].firstElementChild,
hasPullToRefresh: (typeof $scope.onRefresh !== 'undefined'),
onRefresh: function() {
$scope.onRefresh();
$scope.$parent.$broadcast('scroll.onRefresh');
},
onRefreshOpening: function(amt) {
$scope.onRefreshOpening({amount: amt});
$scope.$parent.$broadcast('scroll.onRefreshOpening', amt);
}
sv = new ionic.views.Scroller({
el: $element[0]
});
// Let child scopes access this
$scope.scrollView = sv;