<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 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: link
I tried to do this, 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>