diff --git a/src/components/item/test/sliding/index.ts b/src/components/item/test/sliding/index.ts index 574176ce05..012db577ca 100644 --- a/src/components/item/test/sliding/index.ts +++ b/src/components/item/test/sliding/index.ts @@ -1,21 +1,24 @@ -import {App, Page, IonicApp, Alert, NavController} from '../../../../../src'; +import {ViewChild} from '@angular/core'; +import {App, Page, IonicApp, Alert, NavController, List, ItemSliding} from '../../../../../src'; @Page({ templateUrl: 'main.html' }) class E2EPage { + @ViewChild('myList', {read: List}) list: List; + + items = []; + shouldShow: boolean = true; + constructor(private app: IonicApp, private nav: NavController) { - this.items = []; for (let x = 0; x < 20; x++) { this.items.push(x); } - - this.shouldShow = true; } closeOpened() { - this.app.getComponent('myList').closeSlidingItems(); + this.list.closeSlidingItems(); } didClick(item) { @@ -68,7 +71,9 @@ class E2EPage { template: '' }) class E2EApp { + root = E2EPage; + constructor() { - this.root = E2EPage; + } } diff --git a/src/components/item/test/sliding/main.html b/src/components/item/test/sliding/main.html index 9cd2d81812..15495fc7c3 100644 --- a/src/components/item/test/sliding/main.html +++ b/src/components/item/test/sliding/main.html @@ -7,7 +7,7 @@ - +