md-require-match and autofill md-chips

642 Views Asked by At

issue is To restrict md-chips to fill only by autocomplete options no other chip should allowed.

any suggestions?

ty in advance

1

There are 1 best solutions below

0
On

You need to set md-require-match to true on the Md-chips element.

From the Ng Material Docs:

md-require-match boolean If true, and the chips template contains an autocomplete, only allow selection of pre-defined chips (i.e. you cannot add new ones).

Also see the Custom Inputs Demo from Ng Material Docs 2