答案 0 :(得分:4)
如果我理解你的问题,请参考下面的代码。
<强>模板强>
<div ng-app="myapp" ng-controller="myCtrl">
<div ng-repeat="item in items">
<input type="text" placeholder="name">
<input type="text" placeholder="email">
<button ng-click="add()">+</button>
<p>Some text some text some text</p>
</div>
</div>
<强>控制器强>
var app = angular.module('myapp',[]);
app.controller('myCtrl',["$scope",function($scope){
$scope.items = [{}];
$scope.add = function(){
$scope.items.push({});
}
}]);