LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

  
    
    

    Ionic Pull to Refresh

    
    
    
  
  

    
      

Pull To Refresh

{{item}}
CSS
body {
  cursor: url('https://ionicframework.com/img/finger.png'), auto;
}
JS
angular.module('ionicApp', ['ionic'])

.controller('MyCtrl', function($scope, $timeout) {
  $scope.items = ['Item 1', 'Item 2', 'Item 3'];
  
  $scope.doRefresh = function() {
    
    console.log('Refreshing!');
    $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');
    
    }, 1000);
      
  };
  
});

Description

Example using ion-refresher for the "pull to refresh" effect
Term
Mon, 11/27/2017 - 21:21

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv