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?
Add autocomplete="off" onto <form> element; Add hidden <input> with autocomplete="false" as a first children element of the form.
Disabling the autocomplete To disable the autocomplete for input fields, we need to set its autocomplete attribute to off . We can also disable the autocomplete for an entire form, instead of a specific input field by setting an autocomplete="off" to the html <form> element.
Use the <input> tag with autocomplete attribute. Set the autocomplete attribute to value “off”.
Start by creating the autocomplete panel and the options displayed inside it. Each option should be defined by a mat-option tag. Set each option's value property to whatever you'd like the value of the text input to be when that option is selected.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With