Good day to all.
Have a form element
<form name="myForm" ng-submit="subMe()">
<input type="text" name="name" value="" />
</form>
and
$scope.subMe = function(){
console.log( $scope.myForm ); // return empty object as {}
}
so, how I can see data in the form? There are many inputs elements will be in the future.
And is the best practice for check valid form in back-end? Do as some like:
var _valid = $http.post();
if ( _valid) {
if ( createUserSuccess() ){
showSucceess();
} else {
showError();
}
} else {
showBadFilledFormElements();
}
Thanks!
<form ng-model="myForm" ...? That should add it to the scope