I should be able to use form.$valid from within my controller functions.
At the moment i can us it from within a submit function as in your examples:
$scope.onSubmit = function(form) {
// First we broadcast an event so all fields validate themselves
$scope.$broadcast('schemaFormValidate');
// Then we check if the form is valid
if (form.$valid) {
// ... do whatever you need to do with your data.
}
};
Actual behaviour
$scope.form.$valid is actually not available in my controller.
How to access this?
Enhancement
I should be able to use form.$valid from within my controller functions. At the moment i can us it from within a submit function as in your examples:
Actual behaviour
$scope.form.$valid is actually not available in my controller. How to access this?