GithubHelp home page GithubHelp logo

infomofo / angular-md-pull-to-refresh Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 9.0 1.14 MB

material pull to refresh

Home Page: https://infomofo.github.io/angular-md-pull-to-refresh/app/

CSS 100.00%

angular-md-pull-to-refresh's Introduction

angular-md-pull-to-refresh

angular-md-pull-to-refresh gives you an angular directive that can be attached to a scrollable element (such as an md-content) and provides a pull-to-refresh functionality.

How do I use it

  1. bower install infomofo/angular-md-pull-to-refresh

  2. include the service in your angular module config

     var app = angular.module('YourApp',['infomofo.angularMdPullToRefresh']);
    
  3. Use the directive in your html file.

     <md-content im-pull-to-refresh refresh-function="refreshFunction()">
    

See a demo

On a mobile device you can visit our gh-page to see a live demo of a pull-to-refresh gesture.

How do I affect the appearance

Currently the directive injects an md-progress-bar with the md-accent color. You can style the css of the progress-bar or the animation around by modifying the following classes, such as:

    .im-pull-to-refresh-progress-bar {
        max-height: 5px;
        opacity: 1;
    }

    .im-pull-to-refresh-progress-bar.ng-hide-add.ng-hide-add-active,
    .im-pull-to-refresh-progress-bar.ng-hide-remove.ng-hide-remove-active {
        -webkit-transition: all linear 0.25s;
        transition: all linear 0.25s;
    }

    .im-pull-to-refresh-progress-bar.ng-hide {
        max-height: 0;
        opacity: 0;
    }

angular-md-pull-to-refresh's People

Contributors

infomofo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-md-pull-to-refresh's Issues

Uncaugth TypeError: Cannot read property 'then' of undefined

Hello.

I am getting the error in this block.

if (!scope.pullToRefreshActive) {
   scope.pullToRefreshActive = true;
   scope.refreshFunction().then(function () {
       scope.pullToRefreshActive = false;
   });
   scope.$digest();
}

Really have no clue of what's going on because at runtime the scope object does have the function defined as:

function (locals) {
     return parentGet(scope, locals);
}

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.