Getting reactive form values in Angular 4

I am using reactive form in my Ionic project. I have multiple slides and each slide has a form. When i’m trying to retrieve the value I’m getting the value from the first slide.

Stackblitz link for the same

it’s too easy, if you are getting value from ngmodel than check every from have different name for each control.

check the stackblitz link. I’m using reactive form and there are some cases where multiple slides have same type of form.

I don’t understand why you’re using slides here at all. Swiper and the form inputs are going to fight over focus and input events in irreconcilable fashion. So I would lose the slides entirely.

For getting answers back, the easiest thing to do would be to put an @Output EventEmitter on the McComponent and bind it out in the parent. Another option would be to implement ControlValueAccessor in McComponent, turning it into a custom form control that can be attached to a reactive form directly.

Whatever you do, I would make it a priority to get the need for binding i into the McComponent to go away. As long as that exists, the component handling the question is too tightly coupled to its host.

Thanks @rapropos. I have used @Output EventEmitter and it’s working fine.