last day (80 days later) » 

5:52 PM
Several questions needs to be answered:
1. Are you expecting to have a dynamic number of questions
 
Yes it should be dynamic. Depending on the number of questions in the allQuestions array
 
I assume last page will be a summary page with which answers were correct?
 
yes that's correct
 
first thing that comes to mind is a service that knows which question you are on, tracks your answers and how many questions there are. Your component will query service and route appropriately
I'd also separate the component into 2 parts - a smart component that does the routing and talking to the service and a dumb form component that emits the answer on submit
 
yes that makes sense
 
6:00 PM
I'll put together a stackblitz to give a better idea - should be 10 mins or so
 
thanks
 
 
1 hour later…
Thanks! Am looking at the code.
 
I have to go but leave any questions here and I'll answer them :)
 
7:32 PM
This is awesome! Thank you so much! I really appreciate it. I see how you were able to get one question per page by creating the QuestionComponent.
I think what's left is to create a summary page and moving the explanation into the div with the question. Also I have a requirement to use ng-content.
for the question
 
 
2 hours later…
9:16 PM
I'm trying to get it to work in WebStorm.
 
9:46 PM
am getting this error in Chrome Dev Tools:
QuestionComponent.html:1 ERROR TypeError: Cannot read property 'options' of undefined
 

  last day (80 days later) »