import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';

@Component({
  selector: 'app-ask',
  templateUrl: './ask.component.html',
  styleUrls: ['./ask.component.css']
})
export class AskComponent implements OnInit {
  questionList:Array<any>;
  constructor(
    private commonService:CommonService
    ) {

   }

  ngOnInit() {
    this.surveyInfo();
  }

  surveyInfo(){
    this.commonService.surveyInfo().then(res=>{
      if(res['success']){
        this.questionList = res['data']['survey'].pages[0];
        
        console.log(this.questionList)
      }
    })
  }
}
