Riot.js Bug Report Template
HTML
<script src="https://cdn.jsdelivr.net/g/[email protected]%28riot.min.js+compiler.min.js%29"></script>
<todo></todo>
<script type="riot/tag">
<todo>
<select>
<option each={ name, i in todos} value={i} selected={isSelected(i) }>{ name.title }</option>
</select>
todos = [
{
title: 'New year'
},
{
title: 'Chirstmas',
show: true
}
];
isSelected (i) {
console.log('title >>>>',i);
if(i === this.selected){
return true;
}else{
return false;
}
}
selected = 1;
</todo>
</script>
CSS
body {
font-family: sans-serif;
}
JavaScript
/**
* Riot.js is loaded from External Resources
* https://cdn.jsdelivr.net/g/[email protected](riot.min.js+compiler.min.js)
*/
riot.mount('*')