You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to instantiate a html-template in a new client-server application (from the project template) WS doesn't find it writing this line to console:
Local template doesn't exist null WebSharper.UI.js:5817
Html-file containing only a form is named:
UploadDialogTemplate.html
It's generated cs-file is:
UploadDialogTemplate.g.cs
And class is named:
Uploaddialogtemplate
WS seeks for key uploaddialogtemplate.
[JavaScript]publicstaticclassClient{staticpublicIControlBodyMain(){varrvInput=Var.Create("");varsubmit=Submitter.CreateOption(rvInput.View);varvReversed=submit.View.MapAsync(input =>{if(input==null)returnTask.FromResult("");returnRemoting.DoSomething(input.Value);});returndiv(input(rvInput),button("Send",submit.Trigger),hr(),h4(attr.@class("text-muted"),"The server responded:",div(attr.@class("jumbotron"),h1(vReversed))),newTemplate.Uploaddialogtemplate().Doc()// <-- this line was added);}}
PS. Also, it would be great if generated cs-file was automatically included to c#-project.
The text was updated successfully, but these errors were encountered:
What's happening here is that the templating system is trying to load the template contents from the DOM, assuming that the template corresponds to the current HTML document, instead of embedding it in the compiled javascript.
The cause is a really silly bug that I'll fix immediately: arguments aren't passed along correctly here.
Until this fix is released you can override this by adding the following to the top of your HTML file:
<!-- ClientLoad = Inline -->
PS. Also, it would be great if generated cs-file was automatically included to c#-project.
I'm not certain the Roslyn analyzer API allows this kind of modification. @Jand42 you know much more than me about Roslyn, is this possible? It would be nice.
When trying to instantiate a html-template in a new client-server application (from the project template) WS doesn't find it writing this line to console:
Html-file containing only a form is named:
It's generated cs-file is:
And class is named:
WS seeks for key
uploaddialogtemplate
.PS. Also, it would be great if generated cs-file was automatically included to c#-project.
The text was updated successfully, but these errors were encountered: