Angular 材质:您可以禁用输入的自动完成建议吗? [英] Angular Materials: Can you disable the autocomplete suggestions for an input?

查看:25
本文介绍了Angular 材质:您可以禁用输入的自动完成建议吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是使用像这样的简单输入容器

I'm just using simple input containers such as this

<md-input-container class="md-block" flex-gt-sm >
    <label>Name</label>
    <input md-maxlength="30" name="name" ng-model="name" />
</md-input-container>

输入字段建议先前输入的值,这掩盖了一些重要的界面元素,在我的情况下也确实没有必要.有什么办法可以禁用这些建议吗?

The input field is suggesting previously entered values which is obscuring some important interface elements and also really not necessary in my case. Is there any way to disable the suggestions?

推荐答案

在input元素中添加autocomplete="off",就像这样:

Add autocomplete="off" to the input element, just like this:

<input md-maxlength="30" name="name" ng-model="name" autocomplete="off" />

请参阅供您参考.

这篇关于Angular 材质:您可以禁用输入的自动完成建议吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆