<!-- 以上实例中,提示信息会在 ng-show 属性返回 true 的情况下显示。
只要邮件不合法就会显示不合法的提示!
-->
<!DOCTYPE html>
<html lang="en" ng-app>
<head>
<meta charset="utf-8">
<script src="js/angular.js"></script>
</head>
<body>
<form name="myform">
email:<input type="email" name="myemail" ng-model="text">
<span ng-show="myform.myemail.$error.email">不是一个合法的邮箱地址</span>
</form>
</body>
</html>