Skip to content



Because Hybridly creates a single-page application, a special navigation needs to be made to avoid reloading the whole framework to load a page.

This can be done using a link component in the templates, or programmatically by using the routing API.

Using the component

RouterLink is a simple component that acts as an anchor tag, except it catches navigations to make hybrid requests.

    <router-link href="/">

Learn more about the options available on its API documentation.


It's often necessary to make navigations programmatically. This can be done using the router API.

router.get(url, options), options)
router.delete(url, options)
router.external(url, options)
router.preload(url, options)

Learn more about the functions and options available in their API documentation.

Preloading requests

Preloading views will perform the usual underlying AJAX request, but instead of following-up with the navigation, Hybridly will cache the request result until the navigation is actually required.

This results in a smoother, snappy user experience that may make your application more enjoyable to use.

<router-link> supports the preload attribute, which will preload the corresponding URL when the link component is hovered or mounted, depending on its value.

<!-- Preloads when the link is hovered -->
<router-link href="/" preload>Home</router-link>

<!-- Preloads when the link mounts (on page load) -->
<router-link href="/" preload="mount">Home</router-link>


Alternatively, you may use the router.preload(url, options) function. As for the link component, the navigation will be cached until the next navigation, programmatic or not.