From 4e26ea32949e7e3367c60ac459ddee77b9a990fa Mon Sep 17 00:00:00 2001 From: mhartington Date: Fri, 29 Jul 2016 11:27:09 -0500 Subject: [PATCH] docs(list): clean up docs and hide gestureCtrl --- src/components/item/item-sliding-gesture.ts | 2 +- src/components/list/list.ts | 58 ++++++++------------- 2 files changed, 23 insertions(+), 37 deletions(-) diff --git a/src/components/item/item-sliding-gesture.ts b/src/components/item/item-sliding-gesture.ts index f2d5d86bb1..52ad430ed0 100644 --- a/src/components/item/item-sliding-gesture.ts +++ b/src/components/item/item-sliding-gesture.ts @@ -20,7 +20,7 @@ export class ItemSlidingGesture extends PanGesture { super(list.getNativeElement(), { maxAngle: MAX_ATTACK_ANGLE, threshold: DRAG_THRESHOLD, - gesture: list.gestureCtrl.create('item-sliding', { + gesture: list._gestureCtrl.create('item-sliding', { priority: GesturePriority.SlidingItem, }) }); diff --git a/src/components/list/list.ts b/src/components/list/list.ts index d65c9ac4fe..fcb11cf016 100644 --- a/src/components/list/list.ts +++ b/src/components/list/list.ts @@ -20,6 +20,25 @@ import { GestureController } from '../../gestures/gesture-controller'; * * @demo /docs/v2/demos/list/ * @see {@link /docs/v2/components#lists List Component Docs} + * @advanced + * + * Enable the sliding items. + * + * ```ts + * import { Component, ViewChild } from '@angular/core'; + * import { List } from 'ionic-angular'; + * + * @Component({...}) + * export class MyClass { + * @ViewChild(List) list: List; + * + * constructor() { } + * + * stopSliding() { + * this.list.enableSlidingItems(false); + * } + * } + * ``` * */ @Directive({ @@ -33,7 +52,7 @@ export class List extends Ion { constructor( elementRef: ElementRef, private _rendered: Renderer, - public gestureCtrl: GestureController) { + public _gestureCtrl: GestureController) { super(elementRef); } @@ -45,24 +64,7 @@ export class List extends Ion { } /** - * Enable the sliding items. - * - * ```ts - * import { Component, ViewChild } from '@angular/core'; - * import { List } from 'ionic-angular'; - * - * @Component({...}) - * export class MyClass { - * @ViewChild(List) list: List; - * - * constructor() { } - * - * stopSliding() { - * this.list.enableSlidingItems(false); - * } - * } - * ``` - * @param {boolean} shouldEnable whether the item-sliding should be enabled or not + * @input {boolean} shouldEnable whether the item-sliding should be enabled or not */ @Input() get sliding(): boolean { @@ -98,23 +100,7 @@ export class List extends Ion { /** - * Close the open sliding item. - * - * ```ts - * import { Component, ViewChild } from '@angular/core'; - * import { List } from 'ionic-angular'; - * - * @Component({...}) - * export class MyClass { - * @ViewChild(List) list: List; - * - * constructor() { } - * - * closeItems() { - * this.list.closeSlidingItems(); - * } - * } - * ``` + * Close any sliding items that are open. */ closeSlidingItems() { this._slidingGesture && this._slidingGesture.closeOpened();