dotnet-websharper / ui

A reactive UI library for WebSharper.
https://websharper-samples.github.io/ui/
Apache License 2.0
77 stars 22 forks source link

Templating: allow marking a node so that its contents aren't interpreted #207

Closed Tarmil closed 5 years ago

Tarmil commented 5 years ago

Add a new attribute ws-preserve such that children aren't interpreted for template holes and ws- attributes and nodes. eg:

<div>
    ${ThisIsAHole}
    ${ThisToo}
    <div ws-preserve>${ThisIsNotAHole}</div>
</div>

filled with:

MyTemplate().ThisIsAHole("foo").Doc()

gives:

<div>
    foo

    <div>${ThisIsNotAHole}</div>
</div>