My input form is structured like this:
<div>
<div class="form-group">
<label for="inputQuestion" class="col-sm-2 control-label">Question</label>
<div class="col-sm-10">
<input data-ng-model="publication.question" type="text" class="form-control" id="inputQuestion" placeholder="Question">
</div>
</div>
<br>
<br>
<ul id="itemContainer">
</ul>
</div>
<button type="submit" data-ng-click=addItem() data-ng-click=currentid=currentid+2 class="btn btn-info">Add Item</button>
By clicking the Add Item button, items are added to the ul itemContainer
using JavaScript code in the controller. Now, I want to bind these items in the itemContainer
with an array attribute of "publication," let's say "publication.options." How can I make this happen?
If you think my approach is incorrect, please provide alternative methods to achieve the same outcome!
Thank you in advance for your assistance!