Angular Materials. Can you turn off autocomplete suggestions for input?

I just use simple input containers like

<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 offers previously entered values ​​that hide some important interface elements, and are also really not needed in my case. Is there a way to disable offers?

+23
source share
3 answers

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

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

See this one for reference.

+57
source

, - ( Chrome), , , :

<input md-maxlength="30" name="name" ng-model="name" autocomplete="new-password" />
0

, , , , . , .

-

<input id='cp_state_i' required />

-

<input id='cp_etats_i' required />

, . . , .

, , , -

<input autocomplete='new-password'/>

type = ', . - , .

I'm not sure why browsers will no longer honor autocomplete = 'off'. This creates some headaches when working with CRUD and other reasonable operations other than simple login forms.

0
source

Source: https://habr.com/ru/post/1629095/


All Articles