-1
這裏我想開發公交票預訂網站,我想在用戶輸入時顯示城市。我已經嘗試了很多文章,他們都調用遠程API來獲取數據。但我不知道如何從本地json獲取數據。我已經在asp.net中爲服務器的數據完成了自動填充擴展器。現在,我想這樣做jQuery的本地JSON文件如何使用本地json文件jquery或angularjs實現文本框的自動完成
這裏是我的JSON文件:
{"stationList":[{"stationName":"10 dol","stationId":-1},{"stationName":"Adduroad","stationId":4508},{"stationName":"Adilabad","stationId":4198},{"stationName":"Adoni","stationId":2893},{"stationName":"Afzulgunj","stationId":-1},{"stationName":"Agaratala","stationId":-1},{"stationName":"Agartala","stationId":-1},{"stationName":"Agra","stationId":2486},{"stationName":"Ahmedabad","stationId":2434},
"apiStatus":{"success":true,"message":"SUCCESS"}}
我不知道如何在jQuery的或angularjs實現我曾嘗試在互聯網上發現了許多文章 jQuery autocomplete using a local json file? autocomplete textbox and angularjs
https://angular-ui.github.io/bootstrap/#/typeahead – Phil