【发布时间】:2023-03-13 22:45:02
【问题描述】:
我正在尝试以角度 2 的形式显示验证消息?我收到此错误
无法读取未定义的属性“hasError”
我添加了这些行
<div *ngIf="username.hasError('required') && username.touched"
class="error-box"> username is required</div>
<div *ngIf="username.hasError('minlength') && username.touched"
class="error-box"> Minimum password length is 8!</div>
【问题讨论】:
标签: angularjs ionic-framework angular ionic2 angular2-routing