0

I am developing a portal using ASP.NET MVC plus AngularJS. Everything is working as expected. However, intermittently during development, when I refresh the page, I just see the angular expressions as below (in both chrome and IE 9).

I initially thought it to be a caching issue, and have disabled caching using $httpProvider as suggested here.

Any idea what is the root cause for this behaviour and how to resolve the same.

enter image description here

Community
  • 1
  • 1
utkarsh
  • 588
  • 1
  • 7
  • 18
  • 1
    any errors showing up in the console? – rmuller Mar 16 '15 at 10:59
  • No errors in console. I use console extensively for debugging and logs, I do not see any. – utkarsh Mar 16 '15 at 11:04
  • Do you mean that those angular expressions appear only until angular evaluates them? or do they remain even after everything loads? – Jahongir Rahmonov Mar 16 '15 at 11:07
  • they remain even after load. basically page just stops. if I hit F5, everything is fine. It is very intermittent. It may not be angularjs problem at all. May be I need to uninstall all the chrome extensions and try it. I have angular batarang and ngInspector extensions. – utkarsh Mar 16 '15 at 11:12
  • that has happened to me a few times when I changed my javascript files. Basically, yes, hard refresh usually helps – Jahongir Rahmonov Mar 16 '15 at 11:29
  • Okay! At least I'm not alone. Just wanted to know th root cause. Not a blocking issue for me though.. – utkarsh Mar 16 '15 at 11:31
  • Try to use the attribute ng-bind instead of expression. – user3125999 May 08 '15 at 08:16

1 Answers1

0

I found out that, this is due to console.* statements I had in my JS. Apparently IE does not handle those statements gracefully and throws the error. Hence, AngularJS is not processed. However, console.* statements are executed fine when IE developer tools are active (i.e you have kept it open).

I blogged about the issues I faced (specific to IE) and how I resolved those. From the blog post, this specific issue is addressed under Issue 2 (AngularJS does not execute or executes only when IE developer tools are enabled)

utkarsh
  • 588
  • 1
  • 7
  • 18