0

How can i read json array.it load like this enter image description here

i load json arr using this code -

example.controller('ExhibitionTabCtrl', ['$scope', '$http', function($scope,$http) {
      $http.get("json/pills.json")
      .success(function (response) 
      {
       console.log(response);
       $scope.users = response;
      });
    }]);

In list view red my json data like this

<ion-view title="Sig">
 <ion-content class="padding" ng-controller="ExhibitionTabCtrl"> 

<ion-pane>
      <ion-header-bar class="bar-stable">
        <h1 class="title">Ionic Blank Starter</h1>
      </ion-header-bar>
      <ion-content>
       <ion-list>
           <ion-item ng-repeat="x in users|orderBy:'name'">
           {{ x.name + ', ' + x.full_name+', '+x.description}}
           </ion-item>
         </ion-list>
      </ion-content>
    </ion-pane>  



</ion-content>

</ion-view>

But data not showing in list view.how can i solve this.can any one help me here.Thanks.

2
  • 2
    It seems perhaps you might need $scope.users = response.Sheet1? Commented Mar 15, 2016 at 3:50
  • 1
    Great. I have submitted as answer. Commented Mar 15, 2016 at 4:35

1 Answer 1

2

kosala, you need to specify $scope.users = response.Sheet1 rather than $scope.users = response.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.