Angular Materials: Can you disable the autocomplete suggestions for an input?

Bryce Rogers picture Bryce Rogers · Feb 17, 2016 · Viewed 50.9k times · Source

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?

Answer

Bharat Gupta picture Bharat Gupta · Feb 17, 2016

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

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

See this for your reference.