kfq00 2017-06-22
<ion-content> <ion-list> <ion-list-header>Follow us on Twitter</ion-list-header> <ion-item *ngFor="let i of items"> <!--<ion-icon name="ionic" item-left></ion-icon>--> @ionicframework{{i}} </ion-item> </ion-list> <ion-infinite-scroll (ionInfinite)="doInfinite($event)"> <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="上滑加载"> </ion-infinite-scroll-content> </ion-infinite-scroll> </ion-content>
export class ContactPage { items = []; constructor(public navCtrl: NavController) { for (let i = 0; i < 5; i++) { this.items.push( this.items.length ); } } doInfinite(infiniteScroll) { console.log('Begin async operation'); setTimeout(() => { for (let i = 0; i < 5; i++) { this.items.push( this.items.length ); } console.log('Async operation has ended'); infiniteScroll.complete(); }, 500); } }
templateUrl:'build/app.html',<ion-navid="nav"[root]="rootPage"#contentswipe-back-enabled="false"
项目要实现一个功能,在首页底部中间的tab弹出一个页面,而且是没有底部栏的,而不是像平常滑动的一个子页面。<ion-tab [root]="tab5Root" tabIcon="call" ="cal