浏览器Autofill无法在我的Angular应用程序上工作

问题描述 投票:0回答:1
可以在浏览器或代码中错过一些设置?

我希望自动填充工作的输入字段样本

<form [formGroup]="detailsForm" novalidate> <div style="background-color: cornflowerblue; height: 75px; align-content: center"> <span style="margin: 0 50px 0 25px;"><b>New Entry For</b></span> <input type="text" size="50" formControlName="requestor" /> <div *ngIf="submitted && form['requestor'].invalid"> <div class="text-danger"> This field is required </div> </div> </div> ........ </form>

您正在使用什么版本的角?

如果您使用独立组件,我认为Angular 17+,您需要:

add

[matAutocomplete]="auto"

到您的html中的输入。
独立组件中的导入模块
angular autofill
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.