import { Component, OnInit } from '@angular/core'; import Parse from "parse"; @Component({ selector: 'app-tab2', templateUrl: 'tab2.page.html', styleUrls: ['tab2.page.scss'] }) export class Tab2Page implements OnInit{ currentTab:string = "recommend" constructor() {} onClick(){ alert("666") } ngOnInit() { this.loadNovels() } novelList:Array = [] async loadNovels(){ let query = new Parse.Query("NovelInformation"); let list = await query.find(); this.novelList = list } maleBooks = [ { title: '三体' }, { title: '流浪地球' } ]; femaleBooks = [ { title: '何以笙箫默' }, { title: '步步惊心' } ]; }