I am trying to get the content out of an editable div. But i am stuck at implementing the angular template for it.
I am not sure how to map model data from html template to angular controller.
<div ng-repeat="todo in todos">
<div class="todo.id" ng-model={{ ? }} contenteditable="true">
<pre>{{ todo.text }}</pre>
</div>
<button type="button" class="btn btn-link"
ng-click="editTodo(todo.id)">Edit</button>
</div>
I want to pass whatever text i have under
<div class="todo.id"></div>
Since my div is under ng-repeat, i cannot set ng-model to one scope variable.
What should i have within "ng-model={{ ? }}". Or is there a workaround for such a scenario.
Please guide me on this.