mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
On refresh opening
This commit is contained in:
3
js/ext/angular/src/directive/ionicContent.js
vendored
3
js/ext/angular/src/directive/ionicContent.js
vendored
@ -49,6 +49,9 @@ angular.module('ionic.ui.content', [])
|
||||
el: $element[0].firstElementChild,
|
||||
onRefresh: function() {
|
||||
$scope.onRefresh && $scope.onRefresh();
|
||||
},
|
||||
onRefreshOpening: function(amt) {
|
||||
$scope.onRefreshOpening && $scope.onRefreshOpening({amount: amt});
|
||||
}
|
||||
});
|
||||
// Let child scopes access this
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
<header class="bar bar-header bar-success">
|
||||
<button class="button"><i class="icon ion-home"></i></button>
|
||||
</header>
|
||||
<content on-refresh="onRefresh()" has-header="true" ng-controller="AppCtrl" class="reveal-animation">
|
||||
<content on-refresh="onRefresh()" on-refresh-opening="onRefreshOpening(amount)" has-header="true" ng-controller="AppCtrl" class="reveal-animation">
|
||||
<refresher>
|
||||
<div id="refresh-content">
|
||||
<i class="icon ion-ios7-reloading"></i>
|
||||
@ -81,6 +81,9 @@
|
||||
$scope.onRefresh = function() {
|
||||
console.log('On refresh');
|
||||
}
|
||||
$scope.onRefreshOpening = function(amt) {
|
||||
console.log('On refresh opening', amt);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user