ionic2 + cordova 应用-列表刷新(上拉)

阅读更多

9.1 列表使用(欢迎加入Q群一起学习讨论657185219)



  
    Follow us on Twitter
    
      
      @ionicframework{{i}}
    
  


  
    
    
  

 

9.2 控制层

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);
  }

}

 

你可能感兴趣的:(ionic2,cordova,angular,中文,教程)