I'm having a problem with a simple test with KnockoutJS in conjunction with MooTools:
<div>
<select data-bind="foreach: animais">
<option data-bind="text: nome, value: id"></option>
</select>
</div>
var Animal = new Class({
initialize: function(id, nome) {
this.self = this;
self.id = id;
self.nome = nome;
}
});
viewModel = new Class({
initialize: function(animais) {
this.self = this;
self.animais = animais;
}
});
ko.applyBindings(new viewModel([
new Animal(1, "Cachorro"),
new Animal(2, "Gato"),
new Animal(3, "Macaco")
]));
Run JSFiddle: link
Interestingly, the select contains "Monkey" repeated 3 times.