dist/lemurro.js
function loadModal(loadModalParams, loadModalOptions) {
      // Load Modal Props
      var url = loadModalParams.url;
      var content = loadModalParams.content;
      var template = loadModalParams.template;
      var templateUrl = loadModalParams.templateUrl;
      var component = loadModalParams.component;
      var componentUrl = loadModalParams.componentUrl;

      // Component/Template Callbacks
      function resolve(contentEl) {
        if (contentEl) {
          if (typeof contentEl === 'string') {
            modalParams.content = contentEl;
          } else if (contentEl.f7Component) {
            contentEl.f7Component.$mount(function (componentEl) {
              modalParams.el = componentEl;
              app.root.append(componentEl);
            });
          } else {
            modalParams.el = contentEl;
          }
          onModalLoaded();
        }
      }
      function reject() {
        router.allowPageChange = true;
        return router;
      }

      if (content) {
        resolve(content);
      } else if (template || templateUrl) {
        try {
          router.modalTemplateLoader(template, templateUrl, loadModalOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (component || componentUrl) {
        // Load from component (F7/Vue/React/...)
        try {
          router.modalComponentLoader(app.root[0], component, componentUrl, loadModalOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (url) {
        // Load using XHR
        if (router.xhr) {
          router.xhr.abort();
          router.xhr = false;
        }
        router.xhrRequest(url, loadModalOptions)
          .then(function (modalContent) {
            modalParams.content = modalContent;
            onModalLoaded();
          })
          .catch(function () {
            router.allowPageChange = true;
          });
      } else {
        onModalLoaded();
      }
    }
function loadModal(loadModalParams, loadModalOptions) {
      // Load Modal Props
      var url = loadModalParams.url;
      var content = loadModalParams.content;
      var template = loadModalParams.template;
      var templateUrl = loadModalParams.templateUrl;
      var component = loadModalParams.component;
      var componentUrl = loadModalParams.componentUrl;

      // Component/Template Callbacks
      function resolve(contentEl) {
        if (contentEl) {
          if (typeof contentEl === 'string') {
            modalParams.content = contentEl;
          } else if (contentEl.f7Component) {
            contentEl.f7Component.$mount(function (componentEl) {
              modalParams.el = componentEl;
              app.root.append(componentEl);
            });
          } else {
            modalParams.el = contentEl;
          }
          onModalLoaded();
        }
      }
      function reject() {
        router.allowPageChange = true;
        return router;
      }

      if (content) {
        resolve(content);
      } else if (template || templateUrl) {
        try {
          router.modalTemplateLoader(template, templateUrl, loadModalOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (component || componentUrl) {
        // Load from component (F7/Vue/React/...)
        try {
          router.modalComponentLoader(app.root[0], component, componentUrl, loadModalOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (url) {
        // Load using XHR
        if (router.xhr) {
          router.xhr.abort();
          router.xhr = false;
        }
        router.xhrRequest(url, loadModalOptions)
          .then(function (modalContent) {
            modalParams.content = modalContent;
            onModalLoaded();
          })
          .catch(function () {
            router.allowPageChange = true;
          });
      } else {
        onModalLoaded();
      }
    }
function loadModal ( loadModalParams , loadModalOptions ) { // Load Modal Props var url = loadModalParams . url ; var content = loadModalParams . content ; var template = loadModalParams . template ; var templateUrl = loadModalParams . templateUrl ; var component = loadModalParams . component ; var componentUrl = loadModalParams . componentUrl ; // Component/Template Callbacks function resolve ( contentEl ) { if ( contentEl ) { if ( typeof contentEl === 'string' ) { modalParams . content = contentEl ; } else if ( contentEl . f7Component ) { contentEl . f7Component . $mount ( function ( componentEl ) { modalParams . el = componentEl ; app . root . append ( componentEl ) ; } ) ; } else { modalParams . el = contentEl ; } onModalLoaded ( ) ; } } function reject ( ) { router . allowPageChange = true ; return router ; } if ( content ) { resolve ( content ) ; } else if ( template || templateUrl ) { try { router . modalTemplateLoader ( template , templateUrl , loadModalOptions , resolve , reject ) ; } catch ( err ) { router . allowPageChange = true ; throw err ; } } else if ( component || componentUrl ) { // Load from component (F7/Vue/React/...) try { router . modalComponentLoader ( app . root [ 0 ] , component , componentUrl , loadModalOptions , resolve , reject ) ; } catch ( err ) { router . allowPageChange = true ; throw err ; } } else if ( url ) { // Load using XHR if ( router . xhr ) { router . xhr . abort ( ) ; router . xhr = false ; } router . xhrRequest ( url , loadModalOptions ) . then ( function ( modalContent ) { modalParams . content = modalContent ; onModalLoaded ( ) ; } ) . catch ( function ( ) { router . allowPageChange = true ; } ) ; } else { onModalLoaded ( ) ; } }
Load Modal Content
Load Modal Content