Working with Routes

How do I add a click action to a routed page eg. /routedpage/. The goto url does not work for routes. Please provide assistance. Thanks so much!

1 Like

Ok guys. This is the 5th issue I have on the forum that has no resolution. I am beginning to get a little worried now. Not even an acknowledgment.

Hi James,

Sorry about that - but the questions you ask are a bit too much Framework7 specific and a bit out of the scope here. The browser component you are using is for the browsers only and Framework7 have different ways of triggering urls.

Maybe you can try the Framework7 support forum?

Also for the routes you can check:

http://framework7.io/docs/routes.html

Hi George,
Probably I am not clear, to which I apologize. I can create an href event to a route using a the path method eg. href="/page/". However using wappler’s onClick action dmx-on:click=“browser.goto(”/page/")" . I get a page cant be found. Any advise.

No problem James. I understand what you mean but the browser goto action reloads the whole app as it goes to a totally different url.

The Framework7 has its own way of handling url routing internally - so although it seems like you are redirecting to another url - it handles it internally.

So you can stick for now for regular hrefs and don’t use the App Connect onclick as it is also only for dynamic urls indeed. Can you do that? Use regular href - or do you really need the url to be dynamic? Maybe explain that case more in detail.

Basically on a form submit, on success I want to go to a particular route and if failed go to another. The only way I see how is to use the “Action” which only gives the on:click. Can I place an href in the dmx-on:click="" …?

I see, yes there is a specific router API for that:

http://framework7.io/docs/view.html#router-api-methods-properties

but to integrate it with App Connect, so it can be called on the events, we need to make a special App Connect component wrapper from it.

@patrick can do this and we will see if we can add it in the next update

Well there you go. I love you guys again lol…If this can be added I will be so grateful.

1 Like

Like George already told it requires us to create some special App Connect wrappers for Framework 7, this will take some time.

If you want it on a click event, you can use static events like onclick="app.router.navigate('/ticketsuccess/')".

Actually our App Connect Components also triggers the static events, so when you have a Server Connect Form then you can add onsuccess="app.router.navigate('/ticketsuccess/')" on it. Using the interface in Wappler just add it under Static Events instead of a Dynamic Event.