Error: [$rootScope:infdig] 10 $digest() iterations reached <p>I'm trying to show the posts of my json output into my view but I'm getting an error. </p> <p><code>Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: []</code></p> <p>I did some research and it looks like I'm looping a loop which causes Angular to "crash" before my browser does. But I can't find the error in my code.</p> <p>This is my home state and if I comment out the line <code>return post.getAll();</code> I don't get the error, obviously.</p> <pre><code>.state('home', { url: '/home', templateUrl: '../assets/angular-app/templates/_home.html.haml', controller: 'mainCtrl', resolve: { postPromise: ['posts', function(posts){ return posts.getAll(); }] } }) </code></pre> <p>The getAll(); is referenced here in my service.</p> <pre><code>.factory('posts', [ '$http', function(){ var o = { }; return o; o.getAll = function() { return $http.get('/posts.json').success(function(data){ angular.copy(data, o.posts); }); }; } ]) </code></pre> <p>So I think the error should be in one of these codes, any ideas?</p> <p>I have 2 templates that I include,</p> <p>posts.html.haml</p> <pre><code>%div{"ng-repeat" =&gt; "comment in post.comments | orderBy:'-upvotes'"} {{comment.upvotes}} - by {{comment.author}} %span{:style =&gt; "font-size:20px; margin-left:10px;"} {{comment.body}} %form{"ng-submit" =&gt; "addComment()"} %h3 Add a new comment .form-group %input.form-control{"ng-model" =&gt; "body", :placeholder =&gt; "Comment", :type =&gt; "text"} %button.btn.btn-primary{:type =&gt; "submit"} Post %a{"ui-sref" =&gt; "home"} Home </code></pre> <p>And home.html.haml</p> <pre><code>%form{"ng-submit" =&gt; "addPost()"} %input{:type =&gt; "text", "ng-model" =&gt; "title"} %button{:type =&gt; "submit"} Post %h1 Posts %div{"ng-repeat" =&gt; "post in posts | orderBy: '-upvotes'"} {{ post.title }} - upvotes: {{ post.upvotes }} %a{:href =&gt; "#/posts/{{$index}}"} Comments </code></pre> <p>I've commented both files, and still the error is given.</p>