Home Reference Source
import Router from 'potassium-es/src/Router.js'
public class | source

Router

Extends:

EventHandler → Router

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

routes: *[]

Method Summary

Public Methods
public

addRoute(regex: *, eventName: *, parameters: ...*)

public
public

start()

Inherited Summary

From class EventHandler
public get

listeners: EventListener[]: *

public

addListener(callback: function(eventName: string, eventSource: EventHandler), eventName: Object | Symbol, once: bool)

public
public

removeListener(callback: *, eventName: undefined)

public

trigger(eventName: *, params: ...*)

Send an event to listeners

Public Constructors

public constructor() source

Public Members

public cleanedUp: boolean source

public hashListener: * source

public routes: *[] source

Public Methods

public addRoute(regex: *, eventName: *, parameters: ...*) source

Params:

NameTypeAttributeDescription
regex *
eventName *
parameters ...*

public cleanup() source

public start() source