@lingading97 wrote:
In my app I extract messages from a local php file to display on the screen using $http.get(). The messages display fine in Ionic lab's preview but when I build the app for ios and open it in the simulator or on Ionic View on my phone the message does not show. Does anyone know how to fix this?
Javascript:
myapp.controller('firstcontroller', function ($scope, $http, $ionicModal, $timeout){ $http.get("js/testfile.php") .success(function(data) { $scope.names1 = data.records; $scope.names = $scope.names1; }) .error(function(data) { alert("ERROR"); }); })
HTML:
<ion-content> <p class="quote">"{{names[2].Name}}"</p> <p class="author">- {{names[2].City}}</p> </ion-content>
Posts: 1
Participants: 1