0
<div ng-repeat="(keyC, column) in columns.form" ng-model="columns.form" >
<div class="well">
<p><strong>BLOCO {{ keyC }}</strong></p>
<div ng-repeat="(keyP, p) in column.perguntas" ng-model="column.perguntas" >
<formulario data="p" ></formulario>
</div>
</div>
</div>
How to copy the content that was generated in the DOM to a textarea
?
In fact only a few things should be generated within the textarea
:
<div class="well">
<p><strong>BLOCO 0</strong></p>
<div class="alert alert-danger">88888</div>
</div>
<div class="well">
<p><strong>BLOCO 1</strong></p>
<div class="alert alert-danger">123123123</div>
</div>
Jsfiddle for better explanation: https://jsfiddle.net/na4t6k57/
I tried to do that, but I think it’s totally wrong:
<div ng-init="html = ''"></div>
<div ng-repeat="(keyC, column) in columns.form" ng-model="columns.form" >
{{ html += '<div class="well">' }}
{{ html += '<p><strong>BLOCO' + keyC '</strong></p>' }}
<div ng-repeat="(keyP, p) in column.perguntas" ng-model="column.perguntas" >
{{ html += '<formulario data="p" ></formulario>' }}
</div>
{{ html += '</div>' }}
</div>
<textarea ng-model="html"></textarea>
Why did you put an ng-model in the div ?
– Bartolomeu S. Gusella