【发布时间】:2014-02-28 23:45:16
【问题描述】:
我已经下载并安装了最新版本的 WebSharper。在this page上有一个例子,其中一行如下:
let HomePage =
Template "HomePage" <| fun ctx ->
[ Div [Text "HOME"] Links ctx Div [new Controls.HelloControl()] ]
在 Visual Studio 2012 Ultimate RC 中,“Web 应用程序(Sitelet)”模板已提供以下代码:
let HomePage =
Skin.WithTemplate "HomePage" <| fun ctx ->
[
Div [Text "HOME"]
Links ctx
]
当我尝试在 Links ctx 之后添加 Div [new Controls.HelloControl ()] 时,Visual Studio 红线 Links ctx 带有以下消息:This value is not a function and cannot be applied. 我尝试将 Skin.WithTemplate 更改为 Template,但随后 Template 本身被红线消息The value or constructor Template is not defined。
任何解决问题的帮助将不胜感激。了解 WebSharper 网站上的官方文档是否通常是最新的也会很有帮助。
这是一个屏幕截图。
【问题讨论】:
标签: f# websharper