Created
December 5, 2018 15:23
-
-
Save poef/355ac0949d593dbc02b75251735f45c7 to your computer and use it in GitHub Desktop.
Revisions
-
poef created this gist
Dec 5, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <div id=”counterApp”> <input type=”text” data-simply-field=”counter”> <button data-simply-command=”add1">+</button> <button data-simply-command=”sub1">-</button> <div>Counter is now: <span data-simply-field=”counter”></span></div> </div> <script src=”/js/simply.everything.js”></script> <script> var counterApp = simply.app({ container: document.getElementById(‘counterApp’), commands: { add1: function() { counterApp.view.counter++; }, sub1: function() { counterApp.view.counter — ; } }, view: { counter: 1 } }); </script>