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

@Component({
    selector: 'page-question-detail',
    templateUrl: 'question-detail.html',
})
export class QuestionDetailPage {

    item;
    question;
    constructor(public navCtrl: NavController, public navParams: NavParams,
                public appService: AppService,public viewCtrl:ViewController) {
    }

    ionViewDidLoad() {
        this.item = this.navParams.get('item');
        this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/showInfo/', this.item.id)
            .subscribe((res) => {
                this.question = res.json().data.datalist.datalist;
            })

    }

    dismiss() {
        this.viewCtrl.dismiss();
    }

}
