Top
craft-uikit
craft-widget-

Route

Route

Route object

Ojbect represent route information made by Router.

Constructor

new Route(options)

Source:

constructor

Example
resolveRoutingRequest(route){
    switch(route.path){
        case 'page1':
            this.open(new Page1(),route);
        case 'page2':
            this.open(new Page2(),route);
        default:
            this.open(new NotFound(),route);
    }
}
Parameters:
Name Type Description
options Object

options

Properties
Name Type Description
launch Boolean

true if this is the first launch, or access from out side of application history scope caused by browser back/foward

path String

parsed path. parsing is responsibility of Router implementation. This is not a location.pathname

event PopStateEvent

PopStateEvent if defined

Classes

Route