I followed this stackoverflow solution, but I am facing an issue. I am using css
to make the color of the form control to red when it is invalid.
.ng-invalid:not(form) {
border: 1px solid red;
}
This is the css provided by angular and after this when i run in production mode, see that this css is applied to whole formArray and red box appears for all.