UNPKG

angular-formly-repeating-section

Version:
18 lines (17 loc) 652 B
<!--loop through each element in model array--> <div class="{{hideRepeat}}"> <div class="repeatsection" ng-repeat="element in model[options.key]" ng-init="fields = copyFields(to.fields)"> <formly-form fields="fields" model="element" form="form"> </formly-form> <div style="margin-bottom:20px;"> <button type="button" class="btn btn-sm btn-danger" ng-click="model[options.key].splice($index, 1)"> Remove </button> </div> <hr> </div> <p class="AddNewButton"> <button type="button" class="btn btn-primary" ng-click="addNew()" >{{to.btnText}}</button> </p>