<p>....</p>这段提示显示不出来
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<link rel="stylesheet" type="text/css" href="../lib/bootstrap.min.css">
<title></title>
<style type="text/css">
.red{
background: #a30;
}
.error{
font-color: #a10;
}
p.error{
display: none;
}
input.error{
border: 1px solid #a10;
}
.wrapper{
width: 200px;
margin: 30px auto;
}
</style>
</head>
<body ng-app="myApp" ng-controller="SignUpController">
<div class="wrapper">
<h2>注册</h2>
<form name="signUpForm" ng-submit="submitForm()">
<div class="form-group">
<label>用户名:</label>
<pre>{{signUpForm.username}}</pre>
<input name = "username"
type="text"
class="form-control"
ng-model = "userdata.username"
ng-minlength = "4"
maxlength = "32"
required
>
<p class="error" ng-if="signUpForm.username.$error.required& && signUpForm.username.$touched">用户名不可为空</p>
<p class="error" ng-if="(signUpForm.username.$error.minlength||signUpForm.username.$error.maxlength) && signUpForm.username.$touched">用户名长度应在4-32位之间</p>
</div>
<div class="form-group">
<label>密码:</label>
<input name = "password"
type="password"
class="form-control"
ng-model = "userdata.password"
required
>
<p class="error"></p>
</div>
<div class="form-group">
<label>确认密码:</label>
<input name = "password2"
type="password"
class="form-control"
ng-model = "userdata.password2"
required
>
<p class="error"></p>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">注册</button>
</div>
</form>
</div>
<script src="../lib/angular.min.js"></script>
<script src="../js/main.js"></script>
</body>
</html>