Angular Formly - 将嵌套表单与重复部分组合在一起

时间:2016-11-11 00:02:39

标签: angular-formly

所以这应该非常简单,我只想使用Formly在嵌套表单中组合重复部分。

有些例子可以单独进行,但我找不到任何组合这些功能的例子。

重复部分 http://jsbin.com/murule/32/edit?js,output

嵌套表单 http://jsbin.com/zaqeke/22/edit?js,output

我非常感谢任何可以提供帮助的人!

如果可能,一个例子会很棒。

1 个答案:

答案 0 :(得分:0)

Repeating SectionNested Form

的复杂示例

您可以在repeatSection.html转发器ng-repeat="element in model[options.key]"

中看到

<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>

相关问题