Can I give an ng-form a name that I can check with $pristine?
angularjs, angularjs-directive
Solution
Yes you can do it with `ng-form` directive also
Demo: Fiddle
Problem
I looked at the documentation for ng-form: http://docs.angularjs.org/api/ng.directive:ngForm But it gives me almost no examples and I am still very confused. What I would like to do is to have a table with input fields and then check if fields on the table are unchanged? I don't want to include this in a form so I was wondering if I can use ng-form. My HTML looks like this: ``` <form name="itemForm"> <table> .... </table> <button type="submit" data-ng-disabled="itemForm.$pristine"> </form> ``` Can I do this with an ng-form directive enclosed in a `DIV` and still set the name in the same way?