When trying to reset the data in a form and calling form.setPristine()
, I encounter an issue where the formController
is not registered within the $scope.
It may sound like a basic question, but how can I locate the formController
?
Within the code snippet below, I receive the error "TypeError: Cannot call method 'setPristine' of undefined"
index.html
formController
is when it has been assigned to the$scope
. Since it is not available yet, I am unsure how to retrieve it.