Angular: Reuse html block
http://angularjs.org/
HTML
<script src="http://code.angularjs.org/angular-1.0.0rc5.js"></script>
<div ng-app="test">
<div ng-controller="MyCtrl">
<button ng-click="newForm()">New Form</button>
<br/>
<button ng-click="newForm()">New Form</button>
<br/>
<button ng-click="newForm()">New Form</button>
<br/>
<button ng-click="newForm()">New Form</button>
<form>Hello, <input type="text" /></form>
</div>
</div>
JavaScript
var module = angular.module("test", ['ngResource']);
function MyCtrl($scope, $jsRoutes) {
$scope.newForm = function() {
// what I want is clone the <form></form> part and append it to the side of the clicked button
}
}