Indeed the template instantiation in HTML is not fully supported. Based on your snippet above you are trying to use this feature on the server side, which is not supported at this moment. There is a github issue in the UI repository for this. The feature works correctly on the client side.

By on 10/16/2018 4:14 AM ()

I'd love to see it in a future release. in my opinion it would be a useful feature.

By on 10/25/2018 4:48 AM ()

Hi! Track this ticket, I have already made some progress, this minimal sample is already working. I will expand tests to match client-side functionality and support multi-file cross-referencing. Coming in a release soon.

By on 10/25/2018 9:01 AM ()

Is it included in the latest release? not yet noticed the changes.

it still doesn't work.

1
2
3
4
5
6
7
8
9
10
11
<div class="container">
    <div ws-template="Field">
        Hello, ${Name}!
    </div>
    <ws-Field>
        <Name>First</Name>
    </ws-Field>
    <ws-Field>
        <Name>Last</Name>
    </ws-Field>
</div>
By on 10/26/2018 12:11 PM ()

Hi, this is now released in https://forums.websharper.com/blog/86100

By on 10/30/2018 11:12 AM ()

Still don't work

1
typecheck error FS3033: The type provider 'WebSharper.UI.Templating.TemplatingProvider' reported an error in the context of provided type 'WebSharper.UI.Templating.Template,pathOrHtml="Main.html"', member 'Doc'. The error: The input list was empty.Parameter name: list

Please help Code here

By on 10/30/2018 1:56 PM ()

The fix is released as WebSharper.UI v4.5.6.156. It is included in the project templates v4.5.5.283.

By on 10/31/2018 3:01 AM ()

This is indeed a bug with references within the same file. Here is the ticket: https://github.com/dotnet-websharper/ui/issues/204

I'll do a bugfix release shortly.

By on 10/31/2018 1:54 AM ()

Hi!

You can try it from http://daily.websharper.com/nuget But there has been some regression in the templating type provider, breaking some tests in the build stack, so we need to investigate and fix that before releasing to nuget.org.

By on 10/27/2018 1:25 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