So I have form with one input text field (ng-required="true") and a group of radio buttons (each has ng-model="House.window" ng-required="!House.window"). I've noticed that if I check a radio button first and then type in the field, the form doesn't validate. But if I type in the field and Then check a radio button, then it validates.
But even if I do follow the steps in the right order and the form validates, once the submit function fires it's made to reset the fields. So the text field is set to an empty string and the radio button is set to false. But if I then start by typing in the name, the form immediately validates even though I haven't selected a radio button yet.
Why does these things happen and how can I fix them?
EDIT: I tried to make an example similar to what I'm doing, but unfortunately I keep getting an angular module error on plunkr that I can't figure out. This is NOT an error I get in my final code. If someone can solve this by all means it would help the topic to move forward: plnkr.co/edit/vW6atqN0oYKz7AgUa108
ng-app="myApp"- needs a capital M.