-
Notifications
You must be signed in to change notification settings - Fork 1
Router
Ahmed Abbas edited this page Apr 4, 2025
·
1 revision
Our web component can handle forms out-of-the-box if you configure a router. Add the following tag at the beginning of the <body> tag:
<oggeh-content config="router"></oggeh-content>That will enforce the history state (SPA mode) so that the page does not reload. It's recommended to do so for better network performance. Our web component implements an internal caching logic per visitor session.
However, the router is expecting the following URL patterns to be used across your HTML pages:
| Route | File | Example HTML |
|---|---|---|
/ |
index.html |
<a href="/">Home</a> |
/page/:key |
page.html |
<a href="/page/{{ key }}">{{ subject }}</a> |
/article/:timestamp |
article.html |
<a href="/article/{{ timestamp }}">{{ subject }}</a> |
/news |
news.html |
<a href="/news">News</a> |
/contact |
contact.html |
<a href="/contact">Contact</a> |
/search |
search.html |
<form action="/search" ></form> |
Copyrights © 2012-2025 All Rights Reserved by OGGEH, Inc.