Documentation
¶
Overview ¶
Package router provides a simple browser based router, which just works on the anchor element. It uses the anchor part to provide a virtual path and query parameters using the dom.Window Location.
Index ¶
- func Navigate(url string)
- type Query
- type Route
- type Router
- func (r *Router) AddRoute(path string, f func(Query)) *Router
- func (r *Router) Invalidate() error
- func (r *Router) Navigate(u *url.URL)
- func (r *Router) Release()
- func (r *Router) Reload(force bool)
- func (r *Router) Routes() []Route
- func (r *Router) SetUnhandledRouteAction(f func(Query)) *Router
- func (r *Router) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query represents a routing query and provides a simple access to query based parameters.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Invalidate ¶
func (*Router) SetUnhandledRouteAction ¶
Click to show internal directories.
Click to hide internal directories.