dist/lemurro.js
function loadTab(loadTabParams, loadTabOptions) {
      // Load Tab Props
      var url = loadTabParams.url;
      var content = loadTabParams.content;
      var el = loadTabParams.el;
      var template = loadTabParams.template;
      var templateUrl = loadTabParams.templateUrl;
      var component = loadTabParams.component;
      var componentUrl = loadTabParams.componentUrl;
      // Component/Template Callbacks
      function resolve(contentEl) {
        router.allowPageChange = true;
        if (!contentEl) { return; }
        if (typeof contentEl === 'string') {
          $newTabEl.html(contentEl);
        } else {
          $newTabEl.html('');
          if (contentEl.f7Component) {
            contentEl.f7Component.$mount(function (componentEl) {
              $newTabEl.append(componentEl);
            });
          } else {
            $newTabEl.append(contentEl);
          }
        }
        $newTabEl[0].f7RouterTabLoaded = true;
        onTabLoaded(contentEl);
      }
      function reject() {
        router.allowPageChange = true;
        return router;
      }

      if (content) {
        resolve(content);
      } else if (template || templateUrl) {
        try {
          router.tabTemplateLoader(template, templateUrl, loadTabOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (el) {
        resolve(el);
      } else if (component || componentUrl) {
        // Load from component (F7/Vue/React/...)
        try {
          router.tabComponentLoader($newTabEl[0], component, componentUrl, loadTabOptions, 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, loadTabOptions)
          .then(function (tabContent) {
            resolve(tabContent);
          })
          .catch(function () {
            router.allowPageChange = true;
          });
      }
    }
function loadTab(loadTabParams, loadTabOptions) {
      // Load Tab Props
      var url = loadTabParams.url;
      var content = loadTabParams.content;
      var el = loadTabParams.el;
      var template = loadTabParams.template;
      var templateUrl = loadTabParams.templateUrl;
      var component = loadTabParams.component;
      var componentUrl = loadTabParams.componentUrl;
      // Component/Template Callbacks
      function resolve(contentEl) {
        router.allowPageChange = true;
        if (!contentEl) { return; }
        if (typeof contentEl === 'string') {
          $newTabEl.html(contentEl);
        } else {
          $newTabEl.html('');
          if (contentEl.f7Component) {
            contentEl.f7Component.$mount(function (componentEl) {
              $newTabEl.append(componentEl);
            });
          } else {
            $newTabEl.append(contentEl);
          }
        }
        $newTabEl[0].f7RouterTabLoaded = true;
        onTabLoaded(contentEl);
      }
      function reject() {
        router.allowPageChange = true;
        return router;
      }

      if (content) {
        resolve(content);
      } else if (template || templateUrl) {
        try {
          router.tabTemplateLoader(template, templateUrl, loadTabOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (el) {
        resolve(el);
      } else if (component || componentUrl) {
        // Load from component (F7/Vue/React/...)
        try {
          router.tabComponentLoader($newTabEl[0], component, componentUrl, loadTabOptions, 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, loadTabOptions)
          .then(function (tabContent) {
            resolve(tabContent);
          })
          .catch(function () {
            router.allowPageChange = true;
          });
      }
    }
function loadTab ( loadTabParams , loadTabOptions ) { // Load Tab Props var url = loadTabParams . url ; var content = loadTabParams . content ; var el = loadTabParams . el ; var template = loadTabParams . template ; var templateUrl = loadTabParams . templateUrl ; var component = loadTabParams . component ; var componentUrl = loadTabParams . componentUrl ; // Component/Template Callbacks function resolve ( contentEl ) { router . allowPageChange = true ; if ( ! contentEl ) { return ; } if ( typeof contentEl === 'string' ) { $newTabEl . html ( contentEl ) ; } else { $newTabEl . html ( '' ) ; if ( contentEl . f7Component ) { contentEl . f7Component . $mount ( function ( componentEl ) { $newTabEl . append ( componentEl ) ; } ) ; } else { $newTabEl . append ( contentEl ) ; } } $newTabEl [ 0 ] . f7RouterTabLoaded = true ; onTabLoaded ( contentEl ) ; } function reject ( ) { router . allowPageChange = true ; return router ; } if ( content ) { resolve ( content ) ; } else if ( template || templateUrl ) { try { router . tabTemplateLoader ( template , templateUrl , loadTabOptions , resolve , reject ) ; } catch ( err ) { router . allowPageChange = true ; throw err ; } } else if ( el ) { resolve ( el ) ; } else if ( component || componentUrl ) { // Load from component (F7/Vue/React/...) try { router . tabComponentLoader ( $newTabEl [ 0 ] , component , componentUrl , loadTabOptions , 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 , loadTabOptions ) . then ( function ( tabContent ) { resolve ( tabContent ) ; } ) . catch ( function ( ) { router . allowPageChange = true ; } ) ; } }
Load Tab Content
Load Tab Content