Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to get back a JSON response from my API server that my AngularJS controller is calling.

The controller looks like :

.controller('podcastPlayIndividual', function($scope, $routeParams, $http, $sce){
         $http.get('http://SRHRadio.com/podcasts/9').success(function(data) 
         {
          $scope.items=data 
         }); 
});

But in the developer tab i am getting the error :

    `Error: Maximum call stack size exceeded <error>`

The API server is only sending back a JSON that looks like :

{"id":9,
"title":"first test podcast",
"metadata":"test metadata for first audio",
"length":13.25,
"dateofbroadcast":"2015-05-11T11:05:52+01:00",
"resourceURI":"http://127.0.0.1:80/Media/",
"podcastfile":"sumith.mp3","categories":"sports"}

So i am confused as to where is a an infinite loop with the JSON response.

share|improve this question

put on hold as off-topic by New Dev, easwee, PartiallyFinite, Cristik, Soner Gönül 2 hours ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – New Dev, easwee, PartiallyFinite, Cristik, Soner Gönül
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
On which line of code you are getting this error? –  U10 13 hours ago
1  
Are you doing anything with $scope.items in the view? –  Veatch 13 hours ago
2  
What does the rest of your code look like? Have you got a $watch on anything that could be causing an infinite loop? –  ninjaPixel 13 hours ago

Browse other questions tagged or ask your own question.