import {Component, ViewChild} from '@angular/core';
import {IonicPage, Navbar, NavController, NavParams} from 'ionic-angular';
import {ReviewLearnPage} from "../review-learn/review-learn";

@IonicPage()
@Component({
    selector: 'page-learning-result',
    templateUrl: 'learning-result.html',
})
export class LearningResultPage {
    @ViewChild(Navbar) navbar:Navbar;

    starList = [
        {class: 'star-yellow'},
        {class: 'star-yellow'},
        {class: 'star-gray'},
    ]

    constructor(public navCtrl: NavController, public navParams: NavParams) {
    }

    ionViewDidLoad() {
        this.navbar.backButtonClick = (event)=>{
            let index = this.navCtrl.length() -2;
            this.navCtrl.remove(2,index)
        }
    }

    //测试回顾
    reviewTest() {
        this.navCtrl.push("ReviewLearnPage")
    }

    //重新测试
    resetTest() {
        this.navCtrl.pop()
    }
}
