WinJS allows you to bind HTML properties dynamically at run-time, similar to XAML binding.
<div id="itemTemplate" data-win-control="WinJS.Binding.Template"...>
<h3 data-win-bind="innerText: timestamp"></h3>
</div>
How if I want to also bind the font color style for <h3> as well, how do I achieve that?
Unlike the
data-win-optionsbinding which makes use of{key:value,key2:value2}syntax.data-win-bindinguses a syntax similar to inline-css styles.Using
property:bindingValue;property2:bindingValue2etc will allow you bind multiple properties to the same HTML control.As an example to answer the question above: