mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
test(list): remove infinite list code as this is outdated and broken
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user