I can't get json data with ng-repeat in my ionic app


I’m a newbie so please explain step by step as you can.

I face a little problem in my ionic app, I can’t get json data from the link.

I can see json data in log console but in ng-repeat didn’t import any data!

i.e: json file is too long but here is example:


in app.js:

var app = angular.module('nJson', ['ionic']);

app.controller('nCtrl', function($http, $scope){
$scope.health = [];

        $scope.linux = data.linux;
        $scope.andro = data.android;
        $scope.applica = data.application;
        $scope.social = data.socials;



app.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    if(window.cordova && window.cordova.plugins.Keyboard) {


    if(window.StatusBar) {

in android.html:

<body ng-app="nJson" ng-controller="nCtrl">
        <br />
        <div class="list card">

          <div class="item item-body">
     <a onClick="'{{n.nlink}}', '_blank', 'location=yes', 'toolbar=yes'" ng-repeat="n in andro">
      <img class="full-image" src="{{n.nimg}}">

My steps:

ionic start myapp blank

ionic platform add android

ionic plugin add cordova-plugin-inappbrowser

ionic build android

ionic serve

Did I miss something?

i manually add posts without ng-repeat and json file to get my point.
here is screenshot:



You are using response parameter not data, data is undefined.

        .success(response => {
            $scope.linux = response.linux;
            $scope.andro = response.android;
            $scope.applica = response.application;
            $scope.social = response.socials;

Answered By – Marko Savic

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published