title: Recursively returning a JSON object from a URL list in Angular JS
body: <p>I am trying to return a JSON object in my AngularJS application.
  I have a list of links, I have to pass them one by one, append them to an iniatal link and then grab the json file and display it.</p>
  
  <p>So far even trying with one link doesn't display any result.</p>
  
  <p>This is my controller:</p>
  
  <pre><code>(function () {
      'use strict';
      angular.module('index')
          .filter('resolve', function () {
                  return function (x, $http) {
                      $http.get('http://FirstPartOfTheUrl.com' + x)
                          .success(function (data) {
                              return data;
                          })
                          .error(function () {
                              return 'Error Message';
                          });
                  }
              }
          })
  .controller('indexController', function ($scope, $http) {
      $scope.test = 'https://theUrlIHaveToAppend.com'
  })();
  </code></pre>
  
  <p>and this is in my HTML</p>
  
  <pre><code>&lt;div ng-controller="indexController"&gt;
      {{test | resolve}}
  &lt;/div&gt;
  </code></pre>
  
  <p>displaying the page just returns
  {{test | resolve}}</p>
  
  <p>bare in mind if i try just to print the appended url it does display the correct url and if I click on that I can actually get the file.
  I tried AJAX and asynchronous functions but the problem remains.</p>
  
  <p>as for the recursion I will apply an ng-repeat in the div but I need this to work first.</p>
  
  <p>Thanks</p>