Skip to content
Ahmed Abbas edited this page Apr 4, 2025 · 1 revision

Router

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>

Clone this wiki locally