mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 07:41:51 +08:00
Refresh and refresh callback on content directive
This commit is contained in:
@ -42,7 +42,10 @@
|
||||
#refresh-content {
|
||||
color: #999;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-size: 48px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -52,9 +55,11 @@
|
||||
<header class="bar bar-header bar-success">
|
||||
<button class="button"><i class="icon ion-home"></i></button>
|
||||
</header>
|
||||
<content has-header="true" ng-controller="AppCtrl" class="reveal-animation">
|
||||
<content on-refresh="onRefresh()" has-header="true" ng-controller="AppCtrl" class="reveal-animation">
|
||||
<refresher>
|
||||
Refreshing
|
||||
<div id="refresh-content">
|
||||
<i class="icon ion-ios7-reloading"></i>
|
||||
</div>
|
||||
</refresher>
|
||||
<ul class="list">
|
||||
<li class="list-item" ng-repeat="item in items">asdf{{$index}}</li>
|
||||
@ -73,6 +78,9 @@
|
||||
});
|
||||
}
|
||||
$scope.what = {};
|
||||
$scope.onRefresh = function() {
|
||||
console.log('On refresh');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user