From f8ea096b05ae04ce2ff4bfb19a815a828c3d92c4 Mon Sep 17 00:00:00 2001 From: mhartington Date: Mon, 18 Apr 2016 10:53:23 -0400 Subject: [PATCH] docs(list): update doc example --- ionic/components/list/list.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ionic/components/list/list.ts b/ionic/components/list/list.ts index ca2eb1b298..1435db4784 100644 --- a/ionic/components/list/list.ts +++ b/ionic/components/list/list.ts @@ -52,11 +52,12 @@ export class List extends Ion { * Enable sliding items if your page has them * * ```ts + * import {Page, List} from 'ionic-angular'; + * import {ViewChild} from 'angular2/core'; + * @Page... * export class MyClass { - * constructor(app: IonicApp){ - * this.app = app; - * this.list = this.app.getComponent('my-list'); - * } + * @ViewChild(List) list: List; + * constructor(){} * stopSliding(){ * this.list.enableSlidingItems(false); * } @@ -86,13 +87,12 @@ export class List extends Ion { * Enable sliding items if your page has * * ```ts + * import {Page, List} from 'ionic-angular'; + * import {ViewChild} from 'angular2/core'; + * @Page... * 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 + * @ViewChild(List) list: List; + * constructor(){} * closeItmes(){ * this.list.closeSlidingItems(); * }