I have an html element (div
)
I append anther html element like (textarea
) to to this (div
), I want to bind the value of the added element to ng-model
which is an area
.html file
<div id="new-view{{$index}}"></div>
.js file
var parent = $('#new-view' + controllerIndex);
var question = angular.element('<textarea data-ng-model="self.array['+Index+'].question"></textarea>');
parent.append(question);
How to I bind what the user will write inside this text area to the array?