code: function show(cfg = {}) {
      if (_.isFunction(cfg)) {
          cfg = {
              template: cfg
          };
      }
  
      // no template exists, cannot proceed
      if (!cfg.template) {
          console.warn('No template found!')
          return;
      }
      let doc = null;
      if (getLastDocumentFromStack() && cfg.type === 'modal') { // show as a modal if there is something on the navigation stack
          doc = presentModal(cfg);
      } else { // no document on the navigation stack, show as a document
          doc = Page.makeDom(cfg);
          cleanNavigate(doc);
      }
      return doc;
  }
docs: Helper function to perform navigation after applying the page level default handlers
  
  @private
  
  @param  {Object} cfg         The configurations
  @return {Document}           The created document