angularjs - Add textarea control dynamically in Angular JS -


Please help me at the need with angle JS code below,

The ADD button should be, when we click on ADD, I should add texture controls. I should be able to add unlimited number of texture controls by clicking on this ADD button.

You can do this. This is the easiest way: plunker

html:

  & lt; Div ng-repeat = "textArea in textAreas" & gt; & Lt; Textarea id = "maxlength_textarea" class = "form-control" maxlength = "225" rows = "2" ng-model = "textA.textbox" placeholder = "text box" & gt; & Lt; / Textarea & gt; & Lt; / Div & gt; & Lt; Button class = "btn btn-info" ng-click = "additional ()" & gt; Add more & lt; / Button & gt; In the admin  

:

  $ scope.textAreas = []; $ Scope.addMore = function () {$ scope.textAreas.push ({textBox: ""}}}}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -