I have a project with some business rules that ultimately rely on checking whether a form at a given route is empty. When I say empty, I really mean, empty...but, regardless of whether the user may have entered information at one point then deleted it. As far as I can tell, the $pristine model property is cleared if anything is entered into a field, and remains cleared even if the field is emptied again.
I do not believe that the models being bound are a good source of "empty" in our case, as they may have some initial state, so not everything is going to be null or a blank string. That could be done, if that is the only way to handle this particular use case, but that would require manually implementing this code on each and every view, for each and every model or set of models, for each and every unique form.
Is there a simpler way of checking if a form is empty, in that the fields of the form are at their initial states (i.e. text boxes blank (regardless of whether they may have been filled out and emptied again at some point), checkboxes in their initial state (regardless of whether they may have been changed then restored to their original state manually by the user at some point), radio buttons, dropdowns, etc. all the same way)?