WebBrowserRouter

Summary

A router for web browser-based routing.

Description

The WebBrowserRouter class provides routing for web browser-based applications based on URL hashes (fragment identifiers).

In addition, route parameters are available with the following syntax:

  • user/:id
  • route/:param1/:param2

Examples

Basic Usage
1
2
3
4
5
6
7
import Altitude.Frontend.RouteEngines;
 
WebBrowserRouter router = new WebBrowserRouter();
router.listenEvents(); // Listen for hash change events
 
SomeRoutedController controller = new SomeRoutedController();
controller.registerRoute(router); // Pass the router to register routes for controllers

Methods

Share

HTML | BBCode | Direct Link