【发布时间】:2017-02-01 21:51:21
【问题描述】:
有没有一种简单的方法可以使用Sitelets 和Application.MultiPage 生成一种“默认”路由(例如捕获“未找到”路由)?
示例
type EndPoint =
| [<EndPoint "/">] Home
| [<EndPoint "/about">] About
[<Website>]
let Main =
Application.MultiPage (fun ctx endpoint ->
match endpoint with
| EndPoint.Home -> HomePage ctx
| EndPoint.About -> AboutPage ctx
我想定义一个EndPoint,它可以处理除"/home" 和"/about" 之外的任何请求。
【问题讨论】:
标签: f# websharper