AngularJs 实例

1.AngularJs 表单验证:

示例

.controller('signupController', ['$scope', function($scope) {
$scope.submitted = false;
$scope.signupForm = function() {
if ($scope.signup_form.$valid) {
// Submit as normal
} else {
$scope.signup_form.submitted = true;
}
}
}]);

 
  

 

你可能感兴趣的:(AngularJS)