Self ng.AutoComplete.set_src (Array src) vs. 1.1.0 Full+Lite

Sets the data source array.

Parameters

Array src Required vs. 1.1.0 Full+Lite
The data source array. This can be a simple array of values (e.g. ['One', 'Two', 'Three']) or an array of objects that define the value, text and html (e.g. [{value:1, text:'one', html:'Number 1', group:'Numbers'}, {value:2, text:'two', html:'Number 2', group:'Numbers'}] value is the only required key, the text will be used in the input field and the html and group will be used in the auto complete drop down).
If the type is "remote", this should be a URL to fetch the data. The return text should be a JSON encoded array as above. The URL query will include the following:
  • text: the full user input
  • precaret: text before the caret
  • postcaret: text after the caret

Return

Self Required vs. 1.1.0 Full+Lite
The original ng.AutoComplete object.

API Menu