我发现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;
});
})();发布于 2017-03-18 12:11:48
在HTML中,将autocomplete属性设置为"off“。formly中提到的方法显然不再有效,或者至少在我尝试时不起作用。
https://stackoverflow.com/questions/40978666
复制相似问题