ERROR Error: No value accessor for form control with unspecified name attribute on switch

I fixed this error by adding the name="fieldName" ngDefaultControl attributes to the element that carries the [(ngModel)] attribute.

Leave a Comment