ionic-framework
Version:
An advanced HTML5 mobile app framework built on Angular2
82 lines (81 loc) • 2.21 kB
TypeScript
import { ElementRef, Renderer, NgZone } from 'angular2/core';
import { Ion } from '../ion';
import { ItemSlidingGesture } from '../item/item-sliding-gesture';
/**
* The List is a widely used interface element in almost any mobile app,
* and can include content ranging from basic text all the way to
* buttons, toggles, icons, and thumbnails.
*
* Both the list, which contains items, and the list items themselves
* can be any HTML element.
*
* Using the List and Item components make it easy to support various
* interaction modes such as swipe to edit, drag to reorder, and
* removing items.
*
* @demo /docs/v2/demos/list/
* @see {@link /docs/v2/components#lists List Component Docs}
*
*/
export declare class List extends Ion {
private _zone;
private _enableSliding;
/**
* @private
*/
ele: HTMLElement;
/**
* @private
*/
slidingGesture: ItemSlidingGesture;
constructor(elementRef: ElementRef, _zone: NgZone);
/**
* @private
*/
ngOnDestroy(): void;
/**
* Enable sliding items if your page has them
*
* ```ts
* export class MyClass {
* constructor(app: IonicApp){
* this.app = app;
* this.list = this.app.getComponent('my-list');
* }
* stopSliding(){
* this.list.enableSlidingItems(false);
* }
* }
* ```
* @param {boolean} shouldEnable whether the item-sliding should be enabled or not
*/
enableSlidingItems(shouldEnable: boolean): void;
/**
* Enable sliding items if your page has
*
* ```ts
* export class MyClass {
* constructor(app: IonicApp){
* this.app = app;
* this.list = this.app.getComponent('my-list');
* }
* // Here we have some method that will close the items
* // when called
* closeItmes(){
* this.list.closeSlidingItems();
* }
* }
* ```
*/
closeSlidingItems(): void;
}
/**
* @private
*/
export declare class ListHeader {
private _renderer;
private _elementRef;
private _id;
constructor(_renderer: Renderer, _elementRef: ElementRef, id: string);
id: string;
}