<script>
function showModal() {
  var modal = document.querySelector('ons-modal');
  modal.show();
  setTimeout(function() {
    modal.hide();
  }, 2000);
}
</script>

<ons-modal direction="up">
  <div style="text-align: center">
    <p>
      <ons-icon icon="md-spinner" size="28px" spin></ons-icon> Loading...
    </p>
  </div>
</ons-modal>