Seems like this is working:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[<JavaScript>]        
module Layout =
    
    type PageLayout =
        { Route: string
          Title: string }

    let render page =
        div [ text page.Title ]

[<JavaScript>]
module Meta =
    open Layout

    type PageMeta = 
        { Title: string }

    let createLayout (meta:PageMeta) =
        { Route = ""; Title = meta.Title }
        
module Server =
    open Layout
    open Meta

    [<JavaScript>]
    let render meta =
        Layout.render <| Meta.createLayout meta

    let renderDoc (meta: PageMeta) =
        client <@ render meta @>
By on 1/4/2017 4:36 PM ()

Yes, the contents of the quotation must be a simple call to a top-level function whose arguments are literals or local variables. It looks like indeed we are missing some documentation about the client function; but for more info you can check the documentation for its WebSharper.Html counterpart ClientSide here.

By on 1/5/2017 6:27 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper