【问题标题】:Can't turn off Chrome autocomplete using Angular-formly无法使用 Angular-formly 关闭 Chrome 自动完成功能
【发布时间】:2017-04-20 02:33:24
【问题描述】:

我发现 here 我无法关闭 Chrome 自动完成功能。我做了我必须做的一切,但 Chrome 的自动完成功能仍然有效。无法理解我的错误在哪里以及我必须做些什么来解决它。 我的表单域:

const field_password = {
        key: 'password',
        type: 'input',
        wrapper: 'page-form-field',
        templateOptions: {
          placeholder: 'sigin.password.label',
          type: 'password',
          required: true,
          focus: $ctrl.isPasswordRecover,
        },
      };

  $ctrl.fields = [
    // ...,
    field_password
  ];

我的表单选项

  $ctrl.options = {
    removeChromeAutoComplete: true
  };

我的表格:

        formly-form(
          form   = '$ctrl.form',
          model  = '$ctrl.model',
          fields = '$ctrl.fields',
          options = '$ctrl.options'
        )

还有我的正式配置:

ction() {
  'use strict';

  angular
    .module('WebClientApp.formly', [])

    // Formly
    .config(function(formlyConfigProvider) {
    //...

    })
    .run(function(formlyConfig, formlyValidationMessages) {
      formlyConfig.extras.removeChromeAutoComplete = true;
  });
})();

【问题讨论】:

    标签: angularjs google-chrome autocomplete angular-formly


    【解决方案1】:

    在 HTML 中将自动完成属性设置为“关闭”。形式上提到的方法显然不再有效,或者至少在我尝试时没有。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-29
      • 1970-01-01
      • 2014-09-07
      • 2011-10-23
      • 1970-01-01
      • 1970-01-01
      • 2016-09-26
      • 2015-03-26
      相关资源
      最近更新 更多