<script>
function CounterApp() {
  this.counter = 0;
  this.count = function() {
    this.counter++;
    this.update();
  }
}
</script>

<div sj-app="CounterApp">
<button sj-click="this.count()">Click Me!</button>
<p sj-bind="this.counter"></p>
</div>

back to index