Reputation: 5090
I am getting an error with $digest iterations when running my app on phonegap. On a vanilla web browser, I don't get any errors. Any help here would be great. Thanks
Upvotes: 1
Views: 378
Reputation: 5090
The problem was that I had what appears to be a circular reference. I had function calls built into the scope that ran a redirect function bound to the ng-click directive. When i removed these redirect functions from ngclick and instead just called the redirect function implicitly using onclick and removed the pointer function from the scope object, it began working. I believe it was caused by a function within the scope trying to change the view, thus creating a situation where the watcher never ended because it was still waiting on the view to change and for the view to change the control had to be dereferenced.
Upvotes: 1
Reputation: 12427
This error is usually caused when you have a watcher on some expression (in controller or directive) that modifies the value of that expression, which results in an infinite loop. Please review all your watchers.
Upvotes: 3