From d6b2a83fb15b4f2e1c3a32cf7a19384c62bf9ff0 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 9 Dec 2016 10:34:09 -0600 Subject: [PATCH] test(virtual-scroll): add second page to vs basic --- .../virtual-scroll/test/basic/app-module.ts | 24 +++++++++++-------- .../virtual-scroll/test/basic/main.html | 8 +++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/virtual-scroll/test/basic/app-module.ts b/src/components/virtual-scroll/test/basic/app-module.ts index c0aa84baee..3d42edd9aa 100644 --- a/src/components/virtual-scroll/test/basic/app-module.ts +++ b/src/components/virtual-scroll/test/basic/app-module.ts @@ -1,5 +1,5 @@ -import { Component, ViewChild, ElementRef, NgModule } from '@angular/core'; -import { IonicApp, IonicModule, Platform } from '../../../..'; +import { Component, NgModule } from '@angular/core'; +import { IonicApp, IonicModule, NavController, Platform } from '../../../..'; @Component({ @@ -7,11 +7,9 @@ import { IonicApp, IonicModule, Platform } from '../../../..'; }) export class E2EPage { items: any[] = []; - webview: string; + webview: string = ''; - @ViewChild('content') content: ElementRef; - - constructor(platform: Platform) { + constructor(platform: Platform, public navCtrl: NavController) { for (var i = 0; i < 200; i++) { this.items.push({ value: i, @@ -22,11 +20,14 @@ export class E2EPage { } if (platform.is('ios')) { - if (window.indexedDB) { - this.webview = ': WKWebView'; + if (platform.testUserAgent('Safari')) { + this.webview = ': iOS Safari'; + + } else if (!!window['webkit']) { + this.webview = ': iOS WKWebView'; } else { - this.webview = ': UIWebView'; + this.webview = ': iOS UIWebView'; } } } @@ -35,10 +36,13 @@ export class E2EPage { if (index % 4 === 0) { return index + ' is divisible by 4'; } - return null; } + pushPage() { + this.navCtrl.push(E2EPage); + } + reload() { window.location.reload(true); } diff --git a/src/components/virtual-scroll/test/basic/main.html b/src/components/virtual-scroll/test/basic/main.html index 45348fb1b8..6116fe018a 100644 --- a/src/components/virtual-scroll/test/basic/main.html +++ b/src/components/virtual-scroll/test/basic/main.html @@ -12,6 +12,10 @@ +
+ +
+ @@ -25,4 +29,8 @@ +
+ +
+