Q:

Knockout JS - databind to a literal?

Currently I have the following element
<h6 class="header">
   Chance of Precipitation:  <span data-bind="text: PrecipitationLabel"></span>
</h6>

This works fine, but I don't really need a span tag in my case --the observable only loads for display, so I don't need to update an element. I know I could bind  with a computed/dependent variable that combines the "Chance..." text with PrecipitationLabel, but that takes some of the static markup out of the view, which is not ideal. 
Is there something similar to Razor's  tags to output just a literal?

A:

The functionality you are looking for was added to github 11 days ago.  The syntax would be:
<h6 class="header">
    Chance of Precipitation:  <!-- ko text: PrecipitationLabel --><!-- /ko -->
</h6>

It is not yet included in any published download.

A:

Or you may use this,
 <h6 class="header" data-bind="text: 'Chance of Precipitation: ' + PrecipitationLabel()" />

