我已经审问了很多问题,但没有任何帮助我
尝试使用官方角度js doc
创建表单验证25.3.1
控制器
<div class="modal fade" ng-controller="LoginController" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<form name="form" method="POST" ng-submit="login(user)" novalidate>
<div class="md-form form-sm">
<i class="fa fa-user prefix"></i>
<input type="text" ng-model="user.email" name="email" class="form-control">
<label for="form2">Email</label>
<div ng-show="form.$submitted || form.email.$touched">
<div ng-show="form.email.$error.required">Email required.</div>
</div>
</div>
</form>
但它没有效果