[英]Angular 5 reactive form with custom controls as FormArray example on stackblitz
I have created a sample project on stackblitz to test nesting components en get the complete form value back. 我在stackblitz上创建了一个示例项目,以测试嵌套组件,以获取完整的表单值。
https://stackblitz.com/edit/mensand-hobbies-footbal-tennis https://stackblitz.com/edit/mensand-hobbies-footbal-tennis
Its's a sample where i wan't to use different components stored in a array. 这是一个示例,我不想使用存储在数组中的不同组件。
The form is created correctly but the sub controls aren't bind to the form.value 正确创建了表单,但子控件未绑定到form.value
Do someone know what i'm missing? 有人知道我在想什么吗?
Don't have time to look through all your code at the moment. 目前没有时间查看所有代码。
Take a look at these resources, I did something very similar a few weeks ago. 看看这些资源,几周前我做了非常相似的事情。 Let me know if you are still stuck
让我知道你是否仍然被困
https://coryrylan.com/blog/angular-custom-form-controls-with-reactive-forms-and-ngmodel https://coryrylan.com/blog/angular-custom-form-controls-with-reactive-forms-and-ngmodel
https://blog.thoughtram.io/angular/2016/07/27/custom-form-controls-in-angular-2.html https://blog.thoughtram.io/angular/2016/07/27/custom-form-controls-in-angular-2.html
https://netbasal.com/angular-custom-form-controls-made-easy-4f963341c8e2 https://netbasal.com/angular-custom-form-controls-made-easy-4f963341c8e2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.