I would like to get an entire form's (or div's) HTML including values of each control. I've tried innerHtml/outerHtml. Although they give me the HTML, I'm not able to get the values for the controls.
Business scenario: I have a landing page with a placeholder ("loadHtml") for loading different html forms. Based on user request, I retrieve standard html forms from the server and load them inside "loadhtml" div and have the user entire data in the various fields. Once the user is done with data entry and clicks "Save", I would like to extract the HTML (including textboxes & checkboxes) along with the values and send it to the server and store it as an HTML form.
<div id="loadHtml"></div>
<div class="form-group">
<div class="col-sm-offset-4">
<button class="btn btn-success" ng-click="save()">Save</button>
</div>
</div>