如何展示<Div
&gt;每次点击<Button>
。
以下是我的默认<Div>
,它有Add
按钮。
默认Div
始终可见。但是当用户单击“添加”按钮时,新的div应显示在默认div下,依此类推.... If user clicks Add button 5 times than 5 <Div> should show with same controls/inputs under default <Div>.
有什么建议吗?
代码:
<div class="panel-body form-horizontal">
<button ng-click="addStudent = true" class="btn btn-primary">
Add new Student
</button>
<div class="form-group">
<label class="col-lg-2 control-label required">Roll No.</label>
<div class="col-lg-4">
<input type="text" id="rollNo" name="runNumber" class="form-control" data-ng-model="RollNumber" ng-required="true" maxlength="100" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">Student Name</label>
<div class="col-lg-4">
<input type="text" name="studentName" class="form-control" data-ng-model="StudentName" maxlength="500" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">Class Name</label>
<div class="col-lg-4">
<input type="text" name="Class" class="form-control" data-ng-model="ClassName" maxlength="500" />
</div>
</div>
</div>