We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Setting Fields on autocomplete in angularjs


I am trying to set the fields that autocomplete should search through in the data source. The data source looks like this:

[{ name: "Peter", Address: "34 Driving Drive"},
 {name: "Mary", Address: "2 Walking Drive"}]

and my element looks like this:

  <input type="text" class="ejinputtext form-control" ej-autocomplete e-datasource="customerList" e-mincharacter="3" e-fields='{key:"name", text:"name"}' />

This doesn't work thou, am I doing it correctly?

1 Reply

HP Harikrishnan P Syncfusion Team August 20, 2015 12:13 PM UTC

Hi Garwin,

Thanks for using Syncfusion products.

While specifying the values for the attributes of “fields” API, you need to specify as shown below,

<input type="text" ej-autocomplete  e-datasource="dataList" e-fields-key="name" e-fields-text="name"  />

Based on your code we have showcased an example sample in the following link, please check it.


You can refer the following link to know more about the Angular support in our JS components


Also you can refer the angular samples of all components from the following location


You can refer the getting started and API reference of all components from the following link

Please let us know if you have further queries.


Live Chat Icon For mobile
Up arrow icon