Javascript ng按钮错误不工作,仅显示一条消息angularjs
只收到一条信息请输入名字后再输入名字你能建议我是新来的吗?如果输入名字,请建议如何停止出错Javascript ng按钮错误不工作,仅显示一条消息angularjs,javascript,angularjs,Javascript,Angularjs,只收到一条信息请输入名字后再输入名字你能建议我是新来的吗?如果输入名字,请建议如何停止出错 <div class="text-input"> <label for="player-firstname">First Name *</label> <i class="fa fa-check-circle success" ng-show="signup.userInfo.playerFirstname.$valid"></i&g
<div class="text-input">
<label for="player-firstname">First Name *</label>
<i class="fa fa-check-circle success" ng-show="signup.userInfo.playerFirstname.$valid"></i>
<i class="fa fa-times-circle error" ng-show="signup.userInfo.playerFirstname.$invalid && !signup.userInfo.playerFirstname.$pristine">Pls Enter First Name</i>
<input type="text"
placeholder="James"
id="player-firstname"
name="playerFirstname"
ng-model="player.first_name"
tabindex="1"
required>
</div>
<div class="black-button medium-button float-right" ng-if="signup.$invalid">
<button ng-click="formError()" tabindex="15"><span class="button-text">Create Account
<i class="fa fa-chevron-right"></i>
</button>
</div>
angular.module('users.players.signup', ['vcRecaptcha', 'services.errors'])
.controller('playerSignup', ['user', '$scope', '$log', '$location', '$http', '$timeout', 'auth', 'vcRecaptchaService', '$routeParams', '$rootScope', 'DateUtility', 'notify', function (user, $scope, $log, $location, $http, $timeout, auth, vcRecaptchaService, $routeParams, $rootScope, DateUtility, notify) {
'use strict';
$scope.process
$scope.formError = function(){
$scope.process = true;
if($scope.first_name == null){
notify.message("Pls enter first name");
$scope.process = false;
return;
}
}
名字*
请输入您的名字
创建帐户
angular.module('users.players.signup',['vcreaptcha','services.errors']))
.controller('playerSignup',['user','$scope','$log','$location','$http','$timeout','auth','vcreaptchaservice','$routeParams','rootScope','DateUtility','notify',函数(用户,$scope,$log,$location,$http,$timeout,auth,vcreaptchaservice,$routeParams,$rootScope,DateUtility,notify){
"严格使用",;
$scope.process
$scope.formError=函数(){
$scope.process=true;
如果($scope.first_name==null){
通知信息(“请输入名字”);
$scope.process=false;
返回;
}
}
ng click=“formError()”
应该是ng click=“formErrors()”
一个-不确定这是否是唯一的问题,但应该向前推进。itamar写它时可以添加错误,不用担心,任何人都可以建议吗