I am working on a project wer I need to show a select option in ng-repeat.
As you can see on the above image we have number of select options. And on select option click I am calling a service which will fetch out the answer data to populate in select option.
My issue is each and every time I click on select option the first select answer will be empty.
Is thr any way that I can store the value of first dropdown and then select other dropdown without effecting other selected values.
<tr ng-repeat="question in questionnaireData track by $index">
<td><span class="showDot">{{question.QuestionItem}}</span></td>
<td>
<div class="" >
<select ng-if="question.MasterDataCategoryId != null"
id="{{question.QuestionId}}"
ng-model="question[$index]" class="form-control"
ng-click="getAnswersDetails(question)">
<option selected="selected"></option>
<option ng-repeat="answer in answerData"
value="{{answer.MasterData}}">
{{answer.MasterData}}
</option>
</select>
<input ng-if="question.MasterDataCategoryId == null"
id="{{question.QuestionId}}"
ng-model="MasterDataCategoryId[$index].QuestionId"
type="text" name="question.QuestionId"
class="form-control">
</div>