Код: Выделить всё
Data Report for {{customer}}
Tenant: {{tenant}}
This is for testing.
< /code>
Вот мой контекст: < /p>
var context = "{ \"customer\" : \"mycustomer\", \"tenant\" : \"mytenant\" }";
< /code>
Вот код C#, который я использую: < /p>
var template = Handlebars.Compile( html ); // contains the above template
string finalHtml = template( context );
< /code>
Полученный текст, хранящийся в Finalhtml
Data Report for
Tenant:
This is for testing.
Подробнее здесь: https://stackoverflow.com/questions/691 ... le-example