import {Component, ViewChild} from '@angular/core';
import {IonicPage, Navbar, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../../service/http.service";

@IonicPage()
@Component({
  selector: 'page-read-learn',
  templateUrl: 'read-learn.html',
})
export class ReadLearnPage {
    @ViewChild(Navbar) navbar:Navbar

  list = [
      {name:'杨阳洋1', test:[
          {title:"看云识天气的解释1",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释2",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释3",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释4",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
        ]},
      {name:'杨阳洋1', test:[
              {title:"看云识天气的解释1",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释2",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释3",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释4",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          ]},
      {name:'杨阳洋1', test:[
              {title:"看云识天气的解释1",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释2",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释3",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释4",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
              {title:"看云识天气的解释5",content:"蚂蚁上树蚂蚁上树蚂蚁上树" },
          ]},
  ]
  constructor(public navCtrl: NavController, public navParams: NavParams,public appService:AppService) {
  }

  ionViewDidLoad() {
    this.navbar.backButtonClick = ()=>{
        this.appService.alert("是否退出批阅？"),()=>{
            this.navCtrl.pop()
        }
    }
  }

  //
    select(test,boolean){
      test.checked = boolean;
      console.log(this.list)
    }

}
