I can't get the for-each to work correctly in IE9, however works in IE10, IE11
Is there anything wrong with the way I have it? The following code can be used to reproduce the issue in IE9:
var vm = {
MyMessages: [{
MessageType1: 'A',
MessageToShow1: 'B '
}]
};
ko.applyBindings(vm);
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"></script>
<ul data-bind="foreach: {data: MyMessages, as: 'foo'} " class="list-unstyled">
<li>
<div>
<a href="#" class="close" data-dismiss="alert">×</a>
<em><label data-bind='text: foo.MessageType1' /></em>
<label data-bind='text: foo.MessageToShow1' />
</div>
</li>
</ul>
The error I get is that:
'foo' is undefined