Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mde-swipe-to-refresh

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mde-swipe-to-refresh

Swipe to refresh (pull to refresh) for Angular Material

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Angular Material Extensions - Swipe to refresh

Implementation of material design swipe to refresh for Angular Material.

swipe to refresh

Dependencies

  • Angular Material

Installation

bower install mde-swipe-to-refresh --save

Usage

Add script and style:

...
<script src="bower_components/mde-swipe-to-refresh/dist/mde-swipe-to-refresh.min.js"></script>
<link rel="stylesheet" href="bower_components/mde-swipe-to-refresh/dist/mde-swipe-to-refresh.min.css">
...

Add module dependency:

angular.module("yourApp", ['mde.swipeToRefresh'])

Use it:

<div mde-swipe-to-refresh mde-on-refresh="ctrl.refresh()"></div>

By default scrolling element is assumed to be body. If it's not the case, you can specify it with one of the following ways:

  • mde-scroll-host-selector attribute:
<div mde-swipe-to-refresh mde-scroll-host-selector=".container"></any>

It will look up for the first ancestor that matches the selector.

  • mde-swipe-to-refresh-scroll-host directive:
<div mde-swipe-to-refresh-scroll-host>
    <div mde-swipe-to-refresh></div>
</div>

Options

  • mde-on-refresh: Optional expression to evaluate on refresh. If promise is returned, component will stay in spinning state until promise is resolved or rejected.
  • mde-on-cancel: Optional expression to evaluate on cancel.
  • mde-scroll-host-selector: String for determining scroll host from ancestors. It will be ignored if mde-swipe-to-refresh-scroll-host directive is used.
  • mde-threshold: Threshold in pixels. Defaults to mdeSwipeToRefreshConfig.threshold

TODO

  • Improve demo
  • fix bug when scroll host is not correctly set
  • add arrow according to spec

FAQs

Package last updated on 13 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc