<div sj-app="">

<table class="mytable">
  <tr sj-repeat="x in names">
    <td sj-bind="x.Name"></td>
    <td sj-bind="x.Country"></td>
  </tr>
</table>

</div>

<script>
window.addEventListener("DOMContentLoaded", function() {
  fetch('customer.json')
  .then(function(response) {
    return response.json()
  }).then(function(json) {
    window.names = json.records;
    document.querySelector('[sj-app]').update();
  });
}, false);
</script>

back to index