I have some code that runs fine in Chrome and IE9. In IE8 browser, running compatibility mode, it breaks. The user base runs IE8 in compat mode. I put this in to force regular usage: content="IE=edge
<form class="imei-block-radio" name="myForm">
<input type="radio" name="blocktype" ng-model="actionType" value="block" ng-click="changeBlock('block')" checked="true"> Block <br/> <br/>
<input type="radio" name="blocktype" ng-model="actionType" value="unblock" ng-click="changeBlock('unblock')"> Un-Block <br/>
</form>
The code it hits is in a controller for the page and the code does get hit, but the input parameter is 'undefined'.
$scope.changeBlock = function(value) {
alert(value);
if (value == 'unblock')
{
...
}
}
The alert always shows that 'value' is always undefined. Also, other variables defined in the controller like:
$scope.actionType = 'block';
are also undefined inside the changeBlock function.
ng-model seems not to work with input radio in IE8 and older.
This works for me:
<input type="radio" ng-checked="actionType=='block'" ng-click="actionType='block'" name="blocktype" value="block">
<input type="radio" ng-checked="actionType=='unblock'" ng-click="actionType='block'" name="blocktype" value="unblock">
Workaround: replace your ng-model with ng-check and ng-click
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
<script>
document.createElement('header');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('nav');
document.createElement('footer');
</script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->