-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(refresher): Improve refresher animation. Allow pulling icon rota…
…tion to be disabled.
- Loading branch information
1 parent
487e7a9
commit db27fb1
Showing
7 changed files
with
111 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<html ng-app="ionicApp"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | ||
|
||
<title>Ionic Pull to Refresh</title> | ||
|
||
<link rel="stylesheet" href="../../dist/css/ionic.css"> | ||
</head> | ||
<body ng-controller="MyCtrl"> | ||
|
||
<ion-header-bar class="bar-positive"> | ||
<h1 class="title">Pull To Refresh</h1> | ||
</ion-header-bar> | ||
|
||
<ion-content> | ||
<ion-refresher on-refresh="doRefresh()"> | ||
|
||
</ion-refresher> | ||
<ion-list> | ||
<ion-item ng-repeat="item in items">{{item}}</ion-item> | ||
</ion-list> | ||
</ion-content> | ||
<script src="../../dist/js/ionic.bundle.js"></script> | ||
<script> | ||
angular.module('ionicApp', ['ionic']) | ||
|
||
.controller('MyCtrl', function($scope, $timeout) { | ||
$scope.items = ['Item 1', 'Item 2', 'Item 3']; | ||
$scope.doRefresh = function() { | ||
$timeout( function() { | ||
//simulate async response | ||
$scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); | ||
//Stop the ion-refresher from spinning | ||
$scope.$broadcast('scroll.refreshComplete'); | ||
}, 30); | ||
}; | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters