Skip to content

jordangarcia/nuclear-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NuclearJS Router

API

Router

new Router( opts : Object )

Instatiates a new Router

Router#go( location : String ) : void

Router#registerRoutes( routes : Route[] ) : void

Router#registerCatchallRoute( routes : Route[] ) : void

Router#getLocation() : String

Router#redirect( location : String )

Router#windowNavigate( location : String )

Type: Route

match : String|RegExp

handle : Function[]

TODO

  • Add opts.onRouteStart and opts.onRouteComplete to do things like performance benchmarking
  • Deprecate the hashbang use cases - we dont need this and it adds complexity
  • Deprecate the basepath option and just assume the basepath is /
  • Add no-op functionality to next() calls that happen async after Router.go is called again

Causes a real page navigation by using window.location

About

NuclearJS Router

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published