2
我无法访问$ valid的表单元素。
<body ng-controller="MainCtrl">
testForm: {{testForm.testmail.$valid}} <!-- NOTHING APPEARS HERE -->
<form name="testForm">
<input type="email" name="testmail">
</form>
</body>
Plunker:https://plnkr.co/edit/tqVEFohBFBxkkD7WPLTt?p=info
非常感谢!它现在有效 –
添加到它{{testForm.testmail。$ valid && testForm.testmail。$ dirty}} –