0
我發現here我無法關閉Chrome自動填充功能。我盡我所能做的一切,但Chrome的自動完成仍然有效。無法理解我的錯誤在哪裏以及我需要做什麼來解決這個問題。 我的表單字段:無法關閉使用Angular-formly的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'
)
而且我formly配置:
ction() {
'use strict';
angular
.module('WebClientApp.formly', [])
// Formly
.config(function(formlyConfigProvider) {
//...
})
.run(function(formlyConfig, formlyValidationMessages) {
formlyConfig.extras.removeChromeAutoComplete = true;
});
})();