Some advice for the start

Hi,

i just started using F7 and i am very excited about how fast i could get a lot of things to work. Thanks a lot for the effort of creating and maintaining this !

In general everything works fine so far. But now i need some advice on how to do it the best way (as i am stll a bit confused about templates/views/routing) :

I need to create something like a filebrowser or explorer. So i need a template/view (?) that shows items in a listview. If a iterm is clicked, i need a kind of new instance of the same template/view to show the clicked “folder” (whichs items are clickable to show the next aso.).
I would also like to use the “back class” to go back, and dont need to reload the alraedy shown folders.

Whats would be the best way to do it ? Every hint or maybe example is welcome :slight_smile:

Thanks in advance !

I have used the time to dig a bit deeper. I have tried out some examples. But i still dont know which direction to go.

As mentioned before, i need to “walk” through a folder-structure. So i have tried


path: ‘/objectsLevel/:id/’,
// Component Object
component: {
template: `


In the “on:pageInit-Event” i call a function to fill data into a ul. Doesnt seems to be the right way, but it works.

However it seems i cant call the link more than once. It will not take a different id.

So i tried to use a seperate route for each directory-level. Works fine. I can now walk trough different directories. But also only once. When i go back to the root-(folder/page) i cant open the pages again (not even thinking about different content shown).

Error:
framework7.js:6186 Uncaught TypeError: Cannot read property ‘params’ of undefined
at Framework7Component.data

Do i have to manually destroy the page, so i can be reloaded with different content ?

So, maybe someone could be so nice and give me a hint, about which way to go.

Thanks in advance.

Ok, so you need kind of recursive routing. Can you please post an example of data format/structure and your page component?