Link Search Menu Expand Document

Routing

Hof.js router is a modern routing framework and part of Hof.js. It is an open source project of Hof University of Applied Sciences and was created by Prof. Dr. Walter Kern.

Key features

This framework has the following advantages, among others:

  • Regular routes and hashtag based routes are supported.
  • Simple plain html and js because no special components or attributes are required. Regular links can be used and named routes can be called by using a special router protocol.
  • Routing hooks are supported. This makes it possible to call code before or after routing has occured. It also allows to cancel routing based on conditions - a concept known as guards in other frameworks.
  • Redirects and aliases are supported. Both delegate to another component. However, redirects change the URL, aliases keep the URL.
  • Nested routing can be easily achieved to support complex routing scenarios.

These and other concepts will be explained step by step in this guide.

Note

All samples in this guide are interactive. This means you can interact with the rendered ui!


Table of contents


Hof.js is an open source project of Hof University of Applied Sciences. It is MIT licensed.