You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Router type from WebSharper.Sitelets is available for client-side use through a macro. This enables creating routers for endpoint types on the client, which is often used in SPAs in combination of hashed URLs:
openWebSharper.SiteletsopenWebSharper.UI// SPA endpointstypeEndPoint=|[<EndPoint "/">] Home
|[<EndPoint "/counter">] Counter
// Creating a client-side routerletrouter= Router.Infer<EndPoint>()// Installing it and tracking the current page via an RVletcurrentPage= Router.InstallHash EndPoint.Home router
Given this, it would be desirable to be able to compute hash-based URLs, instead of manually accounting for the hash - which looks something like:
Currently, the
Router
type fromWebSharper.Sitelets
is available for client-side use through a macro. This enables creating routers for endpoint types on the client, which is often used in SPAs in combination of hashed URLs:Given this, it would be desirable to be able to compute hash-based URLs, instead of manually accounting for the hash - which looks something like:
This ticket would add this as an extension member to
Router<'T>
, whenWebSharper.UI
is opened.The text was updated successfully, but these errors were encountered: