angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

10 $digest() iterations reached. Aborting!

Open chintan-solanki opened this issue 13 years ago • 2 comments

Angular routing mechanism throwing error message when the URL hash has just one char - '#' (e.g. www.mysite.com/a/b.aspx# )

This issue seems to occur on IE9 but not on Chrome.

plunker to reproduce the issue - http://plnkr.co/edit/dRuNZV1Q7VlRxzhyaA4h

Error message -

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; MSBrowserIE8; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; dmx:p; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; mty:x; ssx:Console; slx:hz.ss.na; MSBrowserIE9) Timestamp: Fri, 23 Aug 2013 12:15:23 UTC

Message: 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [["fn: function(){var e=r.url(),t=l.$$replace;return h&&e==l.absUrl()||(h++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(r.url(l.absUrl(),t),a(e))})),l.$$replace=!1,h}; newVal: 7; oldVal: 6"],["fn: function(){var e=r.url(),t=l.$$replace;return h&&e==l.absUrl()||(h++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(r.url(l.absUrl(),t),a(e))})),l.$$replace=!1,h}; newVal: 8; oldVal: 7"],["fn: function(){var e=r.url(),t=l.$$replace;return h&&e==l.absUrl()||(h++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(r.url(l.absUrl(),t),a(e))})),l.$$replace=!1,h}; newVal: 9; oldVal: 8"],["fn: function(){var e=r.url(),t=l.$$replace;return h&&e==l.absUrl()||(h++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(r.url(l.absUrl(),t),a(e))})),l.$$replace=!1,h}; newVal: 10; oldVal: 9"],["fn: function(){var e=r.url(),t=l.$$replace;return h&&e==l.absUrl()||(h++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(r.url(l.absUrl(),t),a(e))})),l.$$replace=!1,h}; newVal: 11; oldVal: 10"]] Line: 2 Char: 12426 Code: 0 URI: http://plnkr.co/js/apps/editor-0.6.39.js

chintan-solanki avatar Aug 23 '13 12:08 chintan-solanki

You might try setting html5mode to true and set the hashbangprefix to '!'

NathanWalker avatar Aug 27 '13 06:08 NathanWalker

This looks to no longer occur when I use angular 1.2.0. If you still see the issue, could you update the plunkr with a real-world use case (such as using the $location service to change paths instead of directly accessing window.location.href) and re-open this?

jeffbcross avatar Dec 05 '13 20:12 jeffbcross