Angular 2 - Form is invalid when browser autofill

前端 未结 7 2009
广开言路
广开言路 2021-01-31 16:48

I have a Login Form which has email and password fields.

I\'ve chosen for browser autofill.

The problems is: When browser autofills login form, both fields are p

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 17:28

    I had the same problem.

    I solved it by: - removing the Validators.required validator for the password field in the component - using the directive at the tag in the template

提交回复
热议问题