0
我有一個小應用程序來顯示來自不同的Web服務的一些JSON數據,我的代碼是http://play.ionic.io/app/44e0a65d2252。 第二個網址不顯示註釋,我做錯了什麼?爲什麼我的選擇選項中沒有顯示任何數據?
非常感謝。
JS:
this.showSelectValue = function(mySelect) {
$http.get("http://www.stcp.pt/pt//itinerarium/callservice.php?action=linedirslist&lcode="+mySelect)
.success(function (datadir){
self.direcoes = datadir.records;
DataStore.direcoes = self.direcoes;
})
.error(function(error){
DataStore.direcoes.length = 0;
});
HTML:
<p>Selecione o sentido:</p>
<ion-refresher pulling-text="Pull to refresh..." on-refresh="homeCtl.showSelectValue()">
</ion-refresher>
<select>
<option ng-repeat="direcao in StopAsCtrl.direcoes" value="{{direcao.dir}}">{{direcao.descr_dir}}</option>
</select>
當我改變你的消化仍然無法工作,你可以證明在http://play.ionic.io/app/44e0a65d2252 – user3332475
我更新了我的答案給你。 – thepio