diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts
index 539c15b..6c96c13 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts
@@ -34,6 +34,8 @@ export class DynamicQuestionTemplateComponent implements OnInit {
constructor(private quesService:QuesFormService,private _fb:FormBuilder, private matDialog:MatDialog, private loaderService:LoaderService) { }
ngOnInit() {
+ console.log(this.parent_ques);
+
console.log(this.json_answers)
console.log(this.whole_json)
this.parent_ques = this.currFormArrayObj
@@ -126,14 +128,24 @@ export class DynamicQuestionTemplateComponent implements OnInit {
console.log('answers');
console.log(this.json_answers);
console.log(this.parent_ques);
-
- if(this.parent_ques.answers && this.parent_ques.answers instanceof Array){
- console.log(this.parent_ques.answers.length)
- if(this.parent_ques.answers.length == 1){
- console.log(this.parent_ques.answers.answer_id)
- this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
+ console.log(this.parent_ques.answers)
+
+ setTimeout(()=>{
+ console.log(this.parent_ques);
+ if( this.parent_ques.answers ){
+
+ console.log(this.parent_ques.answers.length)
+ console.log( this.formGroupN.get(this.parent_ques.question_key))
+ if(this.parent_ques.answers.length == 1){
+ console.log(this.parent_ques.answers.answer_id)
+ this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
+ }else if(this.parent_ques.type == 3 && this.parent_ques.answers.length == 0){
+ console.log(this.parent_ques.answers.answer_id)
+ this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
+ }
}
- }
+ }, 1000);
+
//console.log(this.group_key);
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
index 7b43d1a..8e70e2e 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
@@ -15,7 +15,7 @@
play_circle_filled
Play
-
+