So I have an input form which looks 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>
The add Item button adds items in the ul itemContainer
using js code running on the controller what I want to do now is to bind the items in the itemContainer
with an array attribute of the "publication" lets say "publication.options" how can I achieve that ?
In case you believe my approach is totally wrong I would appreciate other ways of achieving the same result !
Thanks for your help in advance !