Looping Problem Ionic


#1

Hi i am getting some data from JSON url.
Data consist of some Questions and Answers which are either Radio Questions or Checkbox Questions.

I am displaying them like this,
image
Which gives result,

Q1). What is your age?
Ans1). 29

My problem is that it works really fine with Radio Type Questions but in checkbox where you can select multiple Answers it is giving this result,

Q2). What subject do you like?
Ans2). Mathematics.

Q3). What subject do you like?
Ans3). English.

Q4). What subject do you like?
Ans4). Science.

I want to display them like,

Q2). What subject do you like?
Ans2). English
Mathematics
Science.

Please help, Thank You…


#2

Maybe you can use ngIf, to choose between the two question types.

Then add another question div, that iterates only about the answers.


#3

Thanks brother but i am looking for a more detailed Answer, Thank you