Closed nathnolt closed 5 years ago
<script type="text/mvl" id="template">
<input If={disabled} type="text" disabled/>
<input Else type="text"/>
<button @click={toggle()}>Toggle</button>
</script>
<script>
Moon({
root: "#app",
view: document.getElementById("template").innerHTML,
disabled: false,
toggle() {
this.update({disabled: !this.disabled});
}
});
</script>
It doesn't seem to be possible to set boolean arguments based on state.
Example
but having disabled based on state, so something like
I want this for select options.
If this is in fact possible, then it wasn't clear to me from reading the docs (Or I missed it).
Thank you.