Enable/disabled HTML elements

The simpler way to enable or disabled HTML elements

Example

See this example on jsfiddle


Source code

<html>
<script src="https://lemonadejs.net/v2/lemonade.js"></script>
<div id='root'></div>
<script>
var App = (function() {
  let self = {};
  self.disabled= false;
  let template = `<>
        <button onclick="self.disabled = !self.disabled">{{!self.disabled?'Disable':'Enabled'}}</button>
            <input type="text" disabled="{{self.disabled}}" />
        </>`;

    return lemonade.element(template, self);
});

lemonade.render(App, document.getElementById('root'));
</script>
</html>