Это моя часть HTML
<form name="userForm" ng-submit="submitForm()" novalidate>
<!-- NAME -->
<div class="form-group" ng-class="{ 'has-error' : userForm.name.$invalid && !userForm.name.$pristine }">
<label>Name</label>
<input type="text" name="name" class="form-control" ng-model="user.name" required>
<p ng-show="userForm.name.$invalid && !userForm.name.$pristine" class="help-block">You name is required.</p>
</div>
<button type="submit" ng-disabled="userForm.$invalid">Submit</button>
</form>
Контроллер
$scope.submitForm = function (userForm) {
$scope.master = angular.copy(userForm);
if ($scope.userForm.$valid) {
debugger;
console.log($scope.userForm.name);
alert('our form is amazing');
console.log($scope.userForm);
}
};
Вот почему я не могу получить значения из HTML в контроллер