test(list): remove infinite list code as this is outdated and broken

This commit is contained in:
Brandy Carney
2016-02-10 10:42:16 -06:00
parent a8515115c1
commit b8c0f77034
2 changed files with 7 additions and 43 deletions

View File

@ -1,42 +1,9 @@
import {ProtoViewRef, ViewContainerRef} from 'angular2/core'
import {Directive, Host, forwardRef} from 'angular2/core';
import {App, List} from 'ionic/ionic';
import {App} from 'ionic/ionic';
@App({
templateUrl: 'main.html',
directives: [forwardRef(() => ItemCellTemplate)]
templateUrl: 'main.html'
})
class E2EApp {
constructor() {
this.items = []
for(let i = 0; i < 1000; i++) {
this.items.push({
title: 'Item ' + i
})
}
}
}
/*
Used to find and register headers in a view, and this directive's
content will be moved up to the common navbar location, and created
using the same context as the view's content area.
*/
@Directive({
selector: 'template[cell]'
})
export class ItemCellTemplate {
constructor(@Host() list: List, viewContainer: ViewContainerRef, protoViewRef: ProtoViewRef) {
console.log('Item cell template', list, viewContainer, protoViewRef);
this.protoViewRef = protoViewRef;
this.viewContainer = viewContainer;
list.setItemTemplate(this);
}
// TODO
}

View File

@ -1,10 +1,7 @@
<ion-content padding #content>
<ion-toolbar><ion-title>Infinite List</ion-title></ion-toolbar>
<ion-list inset virtual [items]="items" [content]="content">
<ion-item *cell #item>
{{item.title}}
</ion-item>
</ion-list>
<f style="height: 15000px; width: 100%; background-color: green"></f>
<ion-content padding>
TODO
</ion-content>