You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<head>
<script type="text/javascript" src="http://code.angularjs.org/angular-0.9.8.js" ng:autobind></script>
</head>
<body ng:init="xs = [1,2,3]; sw = 'a'">
<ng:switch on="sw">
<span ng:switch-when="a">
<!-- Does not work -->
<select name="selector1">
<option ng:repeat="v in xs">{{v}}</option>
</select>
<!-- Works -->
<select name="selector2">
<option ng:repeat="v in xs" label = "{{v}}"></option>
</select>
</span>
</ng:switch>
<!-- Works but select box is larger than expected-->
<select name="selector3">
<option ng:repeat="v in xs">{{v}}</option>
</select>
</body>
</html>
For "selector1" you will get the options 1, 2 and {{v}} (the last item
will remain unevaluated).
For "selector2" (the "workaround") you will get the options 1, 2 and 3
as expected.
For "selector3" you will get the options 1, 2 and 3 but the select
box is wider. (Enough to fit "{{v}}").
The text was updated successfully, but these errors were encountered:
Apparently this is still an issue in IE (tested in IE9):
Consider the following example (tested in IE 9):
http://jsfiddle.net/MT32U/12/
When a select with ng:options is inside an ng:switch and is populated
dynamically ("selector2") the width is not properly updated.
Not really working fine with ng-options for me. If I dont use ng-options and insert a select tag manually, scope-values will not be rendered, but instead given out as in the original markup (e.g. {{value}}. It seems to be a rendering step behind in all IEs lower than 10. Also the array or object passed to the select does not get updated instantly, but only if the select ist actually clicked on.
IE8 still shows an empty item in the list box when using ng-options (see screenshot)
$scope.modes = [ {
id : 1,
name : "view calendar"
}, {
id : 2,
name : "adjust schedule"
}, {
id : 3,
name : "update line A"
}, {
id : 4,
name : "update line B"
}, ];
$scope.selectedMode = $scope.modes[0];
I'm on IE9 using IE8 standards via jersey header("X-UA-Compatible", "IE=8")
Confirmed on IE8.
For "selector1" you will get the options 1, 2 and {{v}} (the last item
will remain unevaluated).
For "selector2" (the "workaround") you will get the options 1, 2 and 3
as expected.
For "selector3" you will get the options 1, 2 and 3 but the select
box is wider. (Enough to fit "{{v}}").
The text was updated successfully, but these errors were encountered: