I'm having a little problem with Angularjs version 1.0.1. I created an app and tested it in IE8 in IE7 modus and it is not listening to ng-change nor ng-click, didn't test other handles but at least those two don't work for me... (all other browsers are just fine) I hope you guys can help me with this, or maybe I'm missing something here... Is there a special treatment for IE7/8?
Here you see the controller:
CalculatorCtrl = function($scope) {
$scope.btw = 1;
$scope.input = 0.00;
$scope.output = 0.00;
$scope.getBedrag = function() {
var input = $scope.input;
var btw = $scope.btw;
var output = 0.0;
if(input != 0) {
input = parseFloat(input.replace (",", "."));
var tmp = input+"";
$scope.input = tmp.replace(".", ",");
}
if($scope.isNumber(input)) {
output = $scope.calculateBedrag(input);
if(btw == 1) output = output * 1.19;
$scope.output = output.toFixed(2).replace('.', ',');
} else {
//alert('Voer een bedrag in a.u.b.');
$scope.input = 0;
$scope.output = 0;
}
}
}
In the html I simply use:
<input autocomplete="off" ng-model="input" class="x-width" type="text" name="bedrag" value="" ng-change="getBedrag()" />
<input class="x-width" disabled="disabled" type="text" name="bedrag" value="{{output}}" />
Hope someone can help me :)
Edit: Wel I tried IE Tester to in IE7 modus, didn't work either. I don't have any machine with real IE7 on it, so I can't test that...
Also make sure your application follows the IE guidelines listed in the docs. http://docs.angularjs.org/guide/ie
Well, the docs say:
"Webkit-based browsers (Safari, Chrome, iPhone, Android, WebOS, BlackBerry 6), Firefox, IE6 and above. Note that CSS only works on IE7 and above."
So it should be working OK. Compatibility modes are kinda weird though, and I'd be surprised if they tested it in that mode.
I can't really imagine why you'd need it work in that mode – if you are on an intranet, you can change IE's settings via group policy (as far as I can recall) to stop it using the compat mode.
To make it work you have to use classes to define your Angular mark up. For example:
<div class="ng-controller:CalculatorCtrl">
Instead of
<div ng-controller="CalculatorCtrl">