I am using angularjs in my web application.I have a text box in which locations are selected with autocomplete.This is done with ngAutocomplete.js(Refering this example http://plnkr.co/edit/il2J8qOI2Dr7Ik1KHRm8?p=preview) .I need to load location from database when page is initially loaded .it is not working now.How can I solve it?
Asked
Active
Viewed 4,660 times
1
-
Do not quite understand. After selecting the location it should appear after the "result"? – DimaOverflow Dec 03 '13 at 13:28
-
http://plnkr.co/edit/1KVlgCBVUOVRkEVLLqbJ?p=preview Maybe so? – DimaOverflow Dec 03 '13 at 13:30
-
Are you saying that you want to populate the text boxes with values from a local database instead of them being blank? – billb Dec 03 '13 at 13:53
1 Answers
2
Both website and examples are obsolete, and are made after a previous version of the library.
Refer to the documentation included in the source file instead, you will find out you now need to use ng-model
attribute.
<input type="text" ng-autocomplete ng-model="search.result" details="search.details" options="search.options"/>

Antwan
- 2,091
- 2
- 21
- 25