Hi, I am working on an application that captures responses to questions, a bit like a survey, and am looking for ideas to help me solve the following problem.
My app requests a list of questions from the a web service to ask the user. The response to a question will be of a particular type. The response could be an integer response, a text, a date etc. (There are 12 different types).
For each question type, there is a different piece of HTML markup to display the question and capture the response.
There could be any number of questions returned from the web service, with any combination of types.
How can I use AngularJS to list the questions with the right markup for each one?
I have tried:
<table ng-repeat="question in questions">
<tr ng-include="{{question.HtmlTemplate}}"></tr>
</table>
Where question.HtmlTemplate is the url for the template for this question type - but this doesn't work.