Jand42 on websharper50
C# record cloning #1123 fix build error on new .N… update Microsoft.CodeAnalysis.C… (compare)
Jand42 on websharper50
WIP record inheritance (compare)
Jand42 on websharper50
WIP C# records (compare)
Jand42 on master
#1123 Use suitable dotnet SDK o… (compare)
Jand42 on websharper50
restore runngen scripts publish net50 tests for Chutzpah fix for WS.Tests package (compare)
Jand42 on websharper50
restore double frameworks merge ws5 revert to net461 and 5 more (compare)
Jand42 on websharper50
revert to stable try to fix F# issue builds (compare)
Jand42 on websharper50
optimizations, cleanup, tests update to FCS 39 cleanup net4x refs and 1 more (compare)
Jand42 on fsharp50
minor fixes update frameworks preview fsc (compare)
WebSharper.AspNetCore.WebSocket
. For plain .NET, there are quite a few libs out there
C:\granicz\shopping-cart>dotnet new websharper-spa -lang f# -n MyShoppingCart The template "WebSharper 4 Single Page Application" was created successfully.
An update for template pack WebSharper.Templates::4.7.0.395 is available.
install command: dotnet new -i WebSharper.Templates::4.6.7.382
Is this a working endpoint definition (it is a case in a EndPoint DU):
| [<EndPoint("/validate/{email}/{token}")>] Validate of email:string * token:string
I can't seem to generate the link correctly when calling (ctx.Link (Validate(u.Email,token1)))
and all examples I see are using a class for the endpoint.
<table>
as follows? <table>
<tbody>
<div ws-replace="CartItems">
<div ws-children-template="CartItem">
<tr>
<td class="col1">
<button ws-onclick="Decrement">-</button>
<span class="count">1</span>
<button ws-onclick="Increment">+</button>
<button ws-onclick="Remove">X</button>
<span class="title">${Name}</span>
</td>
<td class="col2">
<code>$${Amount}</code>
</td>
</tr>
</div>
...
index.html
, which I bind with .Bind()
in a SPA, filling CartItems
with items based off of CartItem
instantiations
ws-replace
s left intact
Bind
just breaks because of ill-formed HTML inside the table
tag
UseWebSharperEndpoints
that would setup all endpoints. Now there's still a need to handle remoting requests. I'm wondering if it would be possible to map these to endpoints somehow based on the header x-websharper-rpc
....
x-websharper-rpc
limit the actions taken server side to functions published as rpc? I mean could someone send a post with a dummy x-websharper-rpc
header to the endpoint /delete/48
bypassing the claims checks on aspnet endpoints as these are set after the rpc calls handling?
The Websharper forms introduction says:
You should use Formlets in one of these cases:
You want your code to be extremely concise and define at the same time how input data is composed and validated, and how input fields are rendered.
You are developing a back-office application, prioritizing speed of development over pixel-perfect design.
I'm in this case :-)
But there's no documentation for Formlets in Websharper 4. Are they obsolete or are they replaced by something else in Websharper 4?
Btw, this looks amazing, exactly what I need, and should speed up my app's development! I had to share my enthousiasm :-D
app.ApplicationServices.CreateScope()
to get to the service provider with scope.ServiceProvider
. So in my Websharper function, ctx.Environment.["WebSharper.AspNetCore.Services"]
doesn't have the scoped service when running in TestServer. Is there a way around this?
@rbauduin_gitlab Sorry for dropping this so long, I also have catchup to do on ANC authentication/authorization, was researching into it.
let httpContext = ctx.HttpContext() // needs open WebSharper.AspNetCore
// short for unbox<HttpContext> (ctx.Environment.["WebSharper.AspNetCore.HttpContext"])
let signInManager = httpContext.RequestServices.GetService<SignInManager<ApplicationUser>>()
let userManager = httpContext.RequestServices.GetService<UserManager<ApplicationUser>>()
This way you get the SignInManager/UserManager instances that are scoped to the request.
open Microsoft.Extensions.DependencyInjection
for httpContext.RequestServices.GetService
Hi^^
I try to invoke external JS library function but failed... Could someone kindly help me?