已采纳回答 / Max
这是directive和html 传递数据的,"=" 通过 directive 的 attr 属性的值在局部 scope 的属性和父 scope 属性名之间建立双向绑定。当你想要一个双向绑定的属性的时候,你可以使用=来引入外部属性。无论是改变父 scope 还是隔离 scope 里的属性,父 scope 和隔离 scope 都会同时更新属性值,因为它们是双向绑定的关系 ,详情戳 http://stackoverflow.com/questions/14050195/what-is-the-differen...
2016-09-26
已采纳回答 / 小无奈
这个问题我也碰到,之后是在form表单ng-submit上传递参数,像这样ng-submit="submitForm(signForm.$valid)",只有在main.js中 <...code...>
2016-09-11
已采纳回答 / huyl
<div class="form-group"> <label for="username" class="control-label">Username</label> <input type="text" class="form-control" id="username" ng-model="formModel.username" required="required" ng-pattern...
2016-08-20
已采纳回答 / 炎夏至深
<p class="error" ng-if="signUpForm.password2.$error.required&&signUpForm.password2.$touched">密码不可为空&</p&cla &errp class="error" ng-if="(signUpForm.password2.$error.compare&nUpF&rm.psignUpForm.password2.$touched)&sign&pFor !(si...
2016-07-17
已采纳回答 / __innocence
用ng-pattern,具体看上面我的一个提问;复杂的验证规则无非就是用正则表达式,比如ng-pattern="/^[A-Za-z_][A-Za-z_0-9]{3,31}$/"表示输入内容只能以字母或下划线开头,并且长度必须在4到32位之间。望采纳!!
2016-07-05