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.
Unfortunately, activation email could not send to your email. Please try again.

Setting Fields on autocomplete in angularjs

Thread ID:

Created:

Updated:

Platform:

Replies:

119972 Aug 19,2015 01:14 PM Aug 20,2015 08:13 AM JavaScript 1
loading
Tags: ejAutoCompleteTextBox
Garwin Pryce
Asked On August 19, 2015 01:14 PM

Hello, 

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?



Harikrishnan P [Syncfusion]
Replied On August 20, 2015 08:13 AM

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.

http://jsplayground.syncfusion.com/by3dr0ky

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

http://helpjs.syncfusion.com/js/angularjs


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

http://js.syncfusion.com/demos/web/#!/azure/angularsupport

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

http://docs.syncfusion.com/js/overview
Please let us know if you have further queries.


Regards,
HariKrishnan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;