This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Html.ActionLink<MyController>("Click me!", x => x.MyAction(1,2,3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Html.ActionLink<MyController>("Click me!", x => x.MyAction(1,2,3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Action = | |
| HomePage | |
| AboutUs | |
| BlogHomePage | |
| Blog of BlogId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Router.Infer<'T>() : Router<'T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A [Href (ctx.Link (Blog 5))] [Text "Next blog"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Action = | |
| Home | |
| AboutUs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module View = | |
let ( => ) a b = | |
A [HRef b] -< [Text a] | |
let Page title body = | |
PageContent <| fun ctx -> | |
{ | |
Page.Default with | |
Title = Some title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Site = | |
let HomePage = | |
View.Page "Home" [ | |
Div [Text "Welcome to our website!"] | |
] | |
|> Sitelet.Content "/" Home | |
let AboutUsPage = | |
View.Page "About Us" [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Website() = | |
interface IWebsite<Action> with | |
member this.Actions = [] | |
member this.Sitelet = Site.Main | |
[<assembly: WebsiteAttribute(typeof<Website>)>] | |
do () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Client = | |
open IntelliFactory.WebSharper.Html | |
[<JavaScript>] | |
let Button label = | |
Button [Text label] | |
|>! OnClick (fun button _ -> | |
button.Text <- "CLICKED") | |
type ButtonControl(label: string) = |