[v2] tab as page


#1

hi, i have problem in here. How do I initialize a tab as a page? so for example, to set a specific page using the following functions.

$$(document).on('page:init', '.page[data-name="favorite"]', function (e) { }

I have already set up parts of routes for the tab page like this.

      path: '/',
      url: 'index.html',
      tabs: [
          {
            path: '/',
            id: 'tab-1'
          },
          {
            path: '/tab-2/',
            id: 'tab-2',
            url: 'favorit.html'
          }
      ],
    }

Please help me and I hope you understand what I mean :disappointed_relieved:. and thank you in advance


#2

Nope, tab as a page is not supported. Tab must be inside of page


#3

thank you, but i have one question.

how to keep html element if i change to another tab ? as I know, the use of routable tabs will remove the entire html element if moved to other tabs. and I would like the html element with proceedings of the ajax request is not deleted on the previous tab. as the cache.

my routale tabs same as first post.


#4

View has unloadTabContent parameter http://framework7.io/docs/view.html#view-parameters Just set it to false


#5

but I just want specific tab routable. like just home. I want to build the app like Instagram.


#6

No, view as routable tabs are not supported. Just use usual tabs there, if it is a mobile app, you don’t need them to be routable


#7

oh okay, thank you so much bro :+1: