Search code examples
angularreactiveformarray

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.

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

Do someone know what i'm missing?


Solution

  • 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://blog.thoughtram.io/angular/2016/07/27/custom-form-controls-in-angular-2.html

    https://netbasal.com/angular-custom-form-controls-made-easy-4f963341c8e2