mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Starting to move over to content directive
This commit is contained in:
15
js/ext/angular/src/directive/ionicContent.js
vendored
15
js/ext/angular/src/directive/ionicContent.js
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user