Newer
Older
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService, public storage: Storage) {
}
ionViewDidLoad() {
this.item = this.navParams.get('item');
this.getInfo()
}
this.appService.ObserverHttpPost('/wisdomgroup/modules/question/showOnApp', data)
.subscribe((res) => {
if (res.quesType == 3 && res.option) {
res.quesDesc.forEach(data=>{
if( res.option.answerdesc.indexOf(data.index) != -1 ){
data.select = true;
}else{
data.select = false;
}
});
goToResult() {
this.navCtrl.push('SurveyResultPage', {item: this.survey});