Within my JavaScript code, I am initiating a new question object like this:
$scope.newQuestion = {
answers: []
};
This is how it reflects in the HTML:
<div class="row" ng-repeat="answer in newQuestion.answers">
<div class="input-field col m12">
<input id="answer{{ $index }}" type="text" class="validate" ng-model="newQuestion.answers[$index]">
</div>
</div>
However, I am encountering an issue where the input box loses focus whenever I start typing something.