@eclipse-scout/core
Version:
Eclipse Scout runtime
27 lines • 942 B
TypeScript
import { Event, EventHandler, EventSupport, Route } from '../index';
export declare const router: {
routes: Route[];
events: EventSupport;
currentRoute: Route;
defaultLocation: string;
/**
* Default location is used, when no route is set in the URL when routes are activated initially.
* Typically, this points to your 'home' page.
*/
setDefaultLocation(location: string): void;
prepare($a: JQuery, location: string): void;
activate(location?: string): void;
register(route: Route): void;
on(event: 'routeChange', handler: EventHandler<RouteChangeEvent>): void;
/**
* Updates the location (URL) field in the browser.
*
* @param routeRef a string which identifies a route.
*/
updateLocation(routeRef: string): void;
};
export declare class RouteChangeEvent extends Event {
route: Route;
constructor(route: Route);
}
//# sourceMappingURL=router.d.ts.map