Skip to content

Latest commit

 

History

History
112 lines (76 loc) · 1.33 KB

Router.md

File metadata and controls

112 lines (76 loc) · 1.33 KB

Module Pux.Router

navigateTo

navigateTo :: forall eff. String -> Eff (dom :: DOM | eff) Unit

sampleUrl

sampleUrl :: forall eff. Eff (dom :: DOM | eff) (Signal String)

Returns a signal containing the current window location path and query.

link

link :: forall a. String -> Array (Attribute a) -> Array (Html a) -> Html a

Creates an anchor that pushes new location to HTML5 history.

link "/" [] [ text "Home" ]

RoutePart

data RoutePart
  = Path String
  | Query (Map String String)

Match

newtype Match a
Instances
Functor Match
Alt Match
Apply Match
Plus Match
Applicative Match

end

end :: Match Unit

lit

lit :: String -> Match Unit

num

num :: Match Number

int

int :: Match Int

bool

bool :: Match Boolean

str

str :: Match String

param

param :: String -> Match String

params

params :: Match (Map String String)

any

any :: Match Unit

router

router :: forall a. String -> Match a -> Maybe a