4

I have this problem regarding an AngularJS controller (2 way data binding issue using IE 11 with AngularJS) and I just realized that the problem does NOT occur whenever I have the debugging tools open in IE 11.

Does anyone know why this might occur and if there is a way to fix it?

5
  • 1
    are you using console.log() anywhere in your code? Commented Aug 20, 2014 at 0:43
  • Probably if you change console.log to $log, see what happens Commented Aug 20, 2014 at 0:43
  • I took out console.log() completely since you need the console open to view it. Instead I just have 2 divs on my page that I update with the JSON.stringify($scope.Throttles) and it is still happening. For some reason the $scope.Throttles object is identical before and after my $scope.Throttles = data.Throttles assignment Commented Aug 20, 2014 at 0:50
  • I think I found out why this is happening.. see my answer on my original post Commented Aug 20, 2014 at 1:09
  • 5th bullet msdn.microsoft.com/library/ie/dn265017(v=vs.85).aspx Commented Nov 11, 2014 at 10:23

1 Answer 1

1

Check for IE and then apply. This worked for me:

var isIE = /*@cc_on!@*/false || !!document.documentMode; // Internet Explorer 6-11

if(isIE){
    if (!$httpProvider.defaults.headers.get) {
        $httpProvider.defaults.headers.get = {};
    }
    $httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
    $httpProvider.defaults.headers.get['If-Modified-Since'] = '0';
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.