Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49188

Message Displayed On Ionic Lab But Does Not Display On ios Emulator Or Simulator

$
0
0

@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">&quot;{{names[2].Name}}&quot;</p>
    <p class="author">- {{names[2].City}}</p>
    </ion-content>

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49188

Trending Articles