ionic-framework
Version:
113 lines (112 loc) • 2.33 kB
TypeScript
import { ElementRef } from 'angular2/core';
import { Content } from '../content/content';
/**
* Allows you to add pull-to-refresh to an Content component.
*
* Place it as the first child of your Content or Scroll element.
*
* When refreshing is complete, call `refresher.complete()` from your controller.
*
* @usage
* ```ts
* <ion-refresher (starting)="doStarting()" (refresh)="doRefresh($event, refresher)" (pulling)="doPulling($event, amt)">
*
*
* doRefresh(refresher) {
* console.log('Refreshing!', refresher);
*
* setTimeout(() => {
* console.log('Pull to refresh complete!', refresher);
* refresher.complete();
* })
* }
*
* doStarting() {
* console.log('Pull started!');
* }
*
* doPulling(amt) {
* console.log('You have pulled', amt);
* }
* ```
*/
export declare class Refresher {
/**
* TODO
* @param {Content} content TODO
* @param {ElementRef} elementRef TODO
*/
constructor(content: Content, element: ElementRef);
ngOnInit(): void;
/**
* Initialize touch and scroll event listeners.
*/
initEvents(): void;
onDehydrate(): void;
/**
* TODO
* @param {TODO} val TODO
*/
overscroll(val: any): void;
/**
* TODO
* @param {TODO} target TODO
* @param {TODO} newScrollTop TODO
*/
nativescroll(target: any, newScrollTop: any): void;
/**
* TODO
* @param {TODO} enabled TODO
*/
setScrollLock(enabled: any): void;
/**
* TODO
*/
activate(): void;
/**
* TODO
*/
deactivate(): void;
start(): void;
/**
* TODO
*/
show(): void;
/**
* TODO
*/
hide(): void;
/**
* TODO
*/
tail(): void;
/**
* TODO
*/
complete(): void;
/**
* TODO
* @param {TODO} Y TODO
* @param {TODO} duration TODO
* @param {Function} callback TODO
*/
scrollTo(Y: any, duration: any, callback: any): void;
/**
* @private
* TODO
* @param {Event} e TODO
*/
_handleTouchMove(e: any): void;
/**
* @private
* TODO
* @param {Event} e TODO
*/
_handleTouchEnd(e: any): void;
/**
* @private
* TODO
* @param {Event} e TODO
*/
_handleScroll(e: any): void;
}