Prevent autofill the saved password in angular mat

2019-09-11 12:27发布

问题:

How to prevent the password field from auto-fill with saved password in angular material design

I have used autocomplete="off" it does not worked for me.

   <md-input-container class="md-block margin-top-10" flex-gt-sm>

      <input type="password" name="password" ng-model="auth.user.password"  
         name="password" ng-required="true" autocomplete="off" >  
      </md-input-container>

回答1:

As far as I know this is an issue for material, as documented here.

As mentioned in the comments there is a workaround for this just add autocomplete="off" in the form definition.