Starting out with angular, Ive developed an app which builds a form with directives dynamically chosen from the field type in the data from the server. All the fields are bound to data within $scope using ng-model. The data is loaded and saved to the server using $http.
Today I've looked at Angular forms, and by wrapping all this in a form element, and giving names to each input, I automatically have validation etc, which is very nice.
But now I notice there are two sets of data maintained - my bound data from my model in $scope, and the data separately maintained by the Angular form directive.
Looking at the Angular docs for eg form or input, the example also binds to $scope (ng-model="text"), but form data is separate (myForm.input.*).
Is this apparent duplication best practice? Or is there a way to unify my model with the data maintained by the Angular form, under one structure?