0
我有這個輸入:如何從空輸入(ngModel)值?
<input id="password" type="password" class="form-control" name="password" [(ngModel)]="password">
現在我有功能提交在哪裏,如果用戶如果不,我已經在別的此輸入有效密碼檢查:
else{
this.error = true;
this.message = 'Wrong username or email!'
}
而且我怎樣才能在別人添加像這樣清空該字段:
this.password = '';
問題是什麼? 'this.password ='''不工作? –
我得到 – uzhas
你需要聲明它在你的component..https錯誤房產密碼不對類型LoginComponent存在://angular.io/docs/ts/latest/guide/template-syntax.html# #ngModel –